Diarrhea in the last weeks of pregnancy can be caused by a variety of factors, including hormonal changes, dietary changes, and increased pressure on the intestines. It is often a sign that labor may be approaching, but it is important to stay hydrated and consult with your healthcare provider if you are concerned. They can provide guidance on managing symptoms and ensuring the health and safety of both you and your baby.