The Tran family, which had long held effective control over the Vietnamese throne, overthrew the Ly empire in 1225 by arranging a marriage between one of its members and the eighth-year-old princess who had served as the last Ly monarch. The nation thrived and flourished under the Tran dynasty (1225–1400), whose rulers implemented extensive land reform, enhanced public administration, and promoted the study of Chinese literature.
However, the Tran are best known for defending the nation from the Mongols and the Cham. The majority of northern China and Manchuria were under Mongol rule by 1225, and they were also interested in southern China, Vietnam, and Champa. The Vietnamese had evacuated the city in advance of the Mongol forces of Kublai Khan's invasions in 1257, 1284, and 1287, which led to the destruction of Thang Long (later renamed Hanoi in 1831), the nation's capital. The first two invasions were thwarted by disease, a lack of provisions, the environment, and the Vietnamese strategy of harassment and scorched-earth tactics. Under the command of General Tran Hung Dao, the Vietnamese were also able to repel the third Mongol incursion, which consisted of 300,000 soldiers and a sizable fleet.
The Vietnamese adapted a strategy used by Ngo Quyen in 938 to defeat an invading Chinese fleet, driving iron-tipped stakes into the Bach Dang River's bed (located in northern Vietnam in the present-day provinces of Ha Bac, Hai Hung, and Quang Ninh), and then luring the Mongol fleet into the river just as the tide was beginning to ebb. The entire 400-ship Mongol armada was sunk, captured, or set afire by Vietnamese fire arrows after becoming trapped or impaled by the iron-tipped stakes. Tran Hung Dao's soldiers harassed the Mongol force as it fled to China.
Wars with Champa, which the Tran subjugated to a feudatory state by 1312, characterized the fourteenth century. By 1326, Champa had once more gained its independence. Under the guidance of the Cham hero Che Bong Nga, they launched a succession of assaults against Vietnam between 1360 and 1390, capturing Thang Long in 1371. After Che Bong Nga's death, the Vietnamese regained the initiative once more and continued to advance south at Champa's cost.
Despite their early success, the Tran kings' quality had significantly decreased by the end of the fourteenth century, which allowed the feudal landlord class to exploit the peasantry and spark several uprisings. The short-lived Ho dynasty began in 1400 when General Ho Quy-ly took the throne and declared himself its founder. (1400-07). His reforms included limiting the amount of land a family could own, renting out surplus land to landless peasants, issuing proclamations in Vietnamese rather than Chinese, and establishing free public schools in provincial capitals.
These reforms were unpopular with the feudal landlords. Some of the landowners pleaded with China's Ming Dynasty (1368–1644) to step in because they felt threatened by the changes. In 1407, the Ming established Chinese rule once more, using the restoration of the Tran dynasty as an excuse.