  We report on a measurement of the Cabibbo-Kobayashi-Maskawa CP-violating
phase gamma through a Dalitz analysis of neutral D decays to K0s pi- pi+ in the
processes B-+ -> D(*)K-+, D* -> D pi0, D gamma. Using a sample of 227 million
BBbar pairs collected by the BaBar detector, we measure the amplitude ratios rB
= 0.12+/-0.08+/-0.03+/-0.04 and rB* = 0.17+/-0.10+/-0.03+/-0.03, the relative
strong phases deltaB = 104+/-45+17-21+16-24, and deltaB*= -64+/-41+14-12+/-15
between the amplitudes A(B- -> Dbar(*)0 K-) and A(B- -> D(*)0 K-), and gamma =
70+/-31+12-10+14-11. The first error is statistical, the second is the
experimental systematic uncertainty and the third reflects the Dalitz model
uncertainty. The results for the strong and weak phases have a two-fold
ambiguity.
