Summarize this text:

Muhammad was born at Mecca in 570 CE after his father died; his inheritance included a slave-girl. He was raised in the desert away from the city by a wet nurse for two years. When Muhammad was six, his mother died as they were returning from Medina. His grandfather died two years later in Mecca, and Muhammad joined the family of his uncle Abu Talib. Young Muhammad pastured sheep and goats, and he fought in a local war at the age of twenty. Muhammad began traveling for merchants and gained a reputation as honest and trustworthy. He helped the wealthy widow Khadija double her money; she was 40 and he 25 when they married. On his wedding day Muhammad freed his slave-girl so that she could marry, and he adopted the slave-boy Khadija gave him as his son. During a famine Muhammad adopted Abu Talib's son 'Ali when he was about five. When he was about 35, Muhammad successfully mediated a dispute between tribes at the Ka'ba shrine in Mecca.

Muhammad was born in 570 CE in Mecca, raised by his uncle after the death of his parents, gained a reputation as honest and trustworthy through travel and business dealings, married a wealthy widow and adopted children, and mediated disputes between tribes at the Ka'ba shrine in Mecca.