TITLE: Multidimensional gluing theorem for Riemannian manifolds
QUESTION [7 upvotes]: I would like to understand whether the following multidimensional (partial) generalization of the A.D. Alexandrov gluing theorem is true and, if yes, whether there is a reference.
(The original Alexandrov's gluing theorem was proven in dimension 2 only but under much weaker assumptions on the regularity of the metrics. It is actually much deeper than the situation I consider right now.) 
Let $M_1, M_2$ be two smooth Riemannian manifolds with boundary with sectional curvatures at least $\kappa$. 
Let $f\colon \partial M_1\tilde\to \partial M_2$ be a Riemannian isometry between their boundaries. Define a new smooth manifold without boundary $M=M_1\cup_f M_2$ by identifying the boundaries of $M_1$ and $M_2$ via $f$. 
One defines on $M$ an intrinsic metric: for two points $x,y\in M$ the distance between them is equal to the infimum of the lengths of all paths connecting them when the length of the parts of the path contained in $M_1$ (resp. $M_2$) is computed with respect to the Riemannian metric of $M_1$ (resp. $M_2$).
Remark. It is not hard to see that $M$ has a structure of $C^\infty$-smooth manifold, and the above metric is induced by a $C^0$-regular Riemannian metric.  
Question. Whether the following is known to be true:
 $M$ has a bounded below curvature in the sense of Alexandrov if and only if the sum of the second fundamental forms of the boundaries of $M_1$ and $M_2$ (after the identification via $f$) is non-negative. In that case the curvature of $M$ is at least the above $\kappa$.
A reference would be helpful.

REPLY [4 votes]: Just learned that the answer is positive, at least its main part saying that if the sum of second fundamental forms is non-negative then the curvature of $M$ is at least $\kappa$. The answer is published here:
N. N. Kosovski˘ı, “Gluing of Riemannian manifolds of curvature ≥ κ”, Algebra i
Analiz 14:3 (2002), 140–157.