The Battle of Langfang () took place during the Seymour Expedition during the Boxer Rebellion, in June 1900, involving Chinese imperial troops, the Chinese Muslim Kansu Braves and Boxers ambushing and defeating the Eight-Nation Alliance expeditionary army on its way to Beijing, pushing the Alliance forces to retreat back to Tientsin (Tianjin). 
Preceding clashes.
The Chinese Imperial Tenacious Army under General Nie Shicheng was waging a brutal campaign to suppress the Boxers under orders from Commander in Chief Ronglu. At the same time General Nie was fighting the Boxers (Militia United in Righteousness, "Yihetuan"), the foreign Eight-Nation Alliance launched an invasion of China to reach the Legations at Beijing. The Imperial Court then decided to change its tack and halt the suppression campaign against the Boxers and fight the foreigners instead. There was too much bad blood between General Nie and the Boxers for them to cooperate with each other against the foreigners, so in response, the Imperial Court sent another Chinese Army, the Muslim Kansu Braves under the anti-foreign General Dong Fuxiang fight alongside the Boxers against the foreign Eight-Nation Alliance forces.
On June 6, 1900, the Boxers lost 480 dead in a battle after trying to block the passage of Chinese Imperial troops under General Nie Shicheng at a railway near Langfang.
At Langfang the Alliance forces arrived on June 11. However, their retreat routes had previously been damaged by Boxers' sabotage.
On June 11 and June 14, a large force of Boxers armed only with bladed melee weapons directly charged the Alliance troops at Langfang armed with rifles and machine guns in human wave attacks. During clashes at Langfang, Boxers armed with swords and spears charged the British and Americans, who were armed with guns. At point-blank range one British soldier had to fire four bullets into a Boxer before he stopped, and American Capt. Bowman McCalla reported that single rifle shots were not enough: multiple rifle shots were needed to halt a Boxer. Only machine guns were effective in immediately stopping the Boxers.
The battle.
Chinese account.
Gen. Dong Fuxiang, along with his Chinese Muslim Braves, prepared to ambush the invading western army. The Muslim Gen. Ma Fuxiang and his brother Gen. Ma Fulu personally planned and led the attack, with a pincer movement around the Eight Nation Alliance force. On June 18, 1900, Dong Fuxiang's troops, stationed at Hunting Park in southern Beijing, attacked at multiple points including LangFang. The force of 5,000 included cavalrymen armed with modern rifles. They led a force of Hui Muslims, Dongxiang Muslims, and Baoan Muslims in the ambush at Langfang with Ma Fulu personally leading a cavalry charge, cutting down many enemy troops with his sword and decisively routing them.
Western account.
The Boxers and Dong Fuxiang's army worked together in the joint ambush with the Boxers relentlessly assaulting the Allies head on with human wave attacks displaying "no fear of death" and engaging the Allies in melee combat and putting the Allied troops under severe mental stress by mimicking vigorous gunfire with firecrackers. The Allies however suffered most of their losses at the hands of General Dong's troops, who used their expertise and persistence to engage in "bold and persistent" assaults on the Alliance forces, as remembered by the German Captain Guido von Usedom and the right wing of the Germans was almost at the point of collapse under the attack until they were rescued from Langfang by French and British troops, and the Allies then retreated from Langfang in trains full of bullet holes. The foreign troops, especially the Germans, fought off the attack, killing 400 at a loss of seven dead and 57 wounded. The Kansu Braves lost 200 and the Boxers another 200. The Boxers directly and relentlessly charged the allies during the attack, which unnerved them. The need to care for the wounded, a lack of supplies and the likelihood of additional Chinese attacks resulted in Seymour and his officers deciding to retreat to Tientsin. The unexpected attack on Seymour by the Chinese army was prompted by an allied European and Japanese attack on the Dagu Forts two days beforehand. As a result of the attack in Dagu, the Chinese government had decided to resist Seymour's army and kill or expel all foreigners in northern China. The employment of firecrackers was part of "ruses de guerre".
Carl Röchling drew a picture of Admiral Seymour commanding the retreat and Frank Craig drew a picture of the battle of Langfang.
 ;templatestyles src="Template:Blockquote/styles.css" / ;Early on Sunday morning, 17th June [1900], a week after we had started, the Taku Forts were taken by the Allied Forces in order to relieve Tientsin. That city was invested by the Boxers who began to bombard it next day. Of this of course we were quite ignorant. But the Court in Peking must have received instant news of the fact, for on the afternoon of the 18th Captain von Usedom, the German officer in command of the troops left at Langfang, was attacked by the Imperial forces belonging to General Tung-fuh-siang's division. Their numbers were estimated at 7,000 and they were well armed with modern rifles which they used with effect, so that we suffered considerable casualties.
 ;templatestyles src="Template:Blockquote/styles.css" / ;Messages were then sent back to Lofa and Langfang, recalling trains 2, 3, and 4, the advance by rail being found to be impracticable, and the isolation and separate destruction of the trains a possibility. In the afternoon of June 18, train No. 3 came back from Lofa, and later in the evening Nos. 2 and 4 from Langfang. The latter had been unexpectedly attacked about half past 2 in the afternoon of June 18, by a force estimated at 5,000 men, including cavalry, large numbers of whom were armed with magazine rifles of the latest pattern. Captured banners showed that they belonged to the army of General Tung Fu Hsiang, who commanded the Chinese troops in the hunting park outside Peking, showing that the Chinese imperial troops were being employed to defeat the expedition. This army was composed of especially picked men, 10,000 strong, commanded from the palace. They were said to be well armed, but indifferently drilled.
 ;templatestyles src="Template:Blockquote/styles.css" / ;On 17th messages were sent back to Lofa and Langfang to recall Nos. 2, 3, and 4 trains, it being evident that the advance by rail was impossible, and the isolation and separate destruction of the trains a possibility. No. 3 returned on the afternoon of 18th June, and in the evening Nos. 2 and 4 from Langfang. Captain Von Usedom (His Imperial German Majesty's Navy), the senior officer present with Nos 2 and 4 trains, reported that they had had a severe engagement with the enemy, who unexpectedly attacked them at Langfang about 2.30 p.in. on that day (18th) in great force estimated 'to be-fully 5,000 men (including cavalry), large numbers of whom were armed with -magazine rifles of the latest pattern. The banners captured show them to have belonged to-tho army of General Tung Fu Hsiang, who commands the Chinese troops-in the Hunting Park- outside Peking, and it was thus definitely known for the first time that Imperial Chinese troops were being employed against us. The attack was made in front and on both flanks, the enemy pouring in a heavy fire on the allied forces coming out to engage them ; they were driven off with much loss, but when they saw our forces retiring towards the trains they rallied and made another attack ; a halt was then made and the men were once more beaten off with greater loss than before, and then finally retreated. In this action the Chinese lost over 400 killed, the allied forces 6 killed and 48 wounded.
 ;templatestyles src="Template:Blockquote/styles.css" / ;The principal battle appears to have been that which was fought at Lang Fang on June 18, 1900, the battle which decided the Admiral to turn back. The allied force here consisted only of about one-third of the expedition, the British detachment being supplied by the Endymion, Aurora, and Orlando. The enemy numbered about 5,000, and it was not until after between two and three hours' hard fighting that the attack was repulsed. The enemy sustained a loss of between 400 and 500, while the loss on our side was 58 killed and wounded. Two days previously the Admiral had discovered that his communications with Tientsin had also been cut, that the bridge at Yangtsun was destroyed, and that the trains were useless.
It was this battle which led Seymour's forces to realize that the Chinese Imperial Army had joined the fight alongside the Boxers and played a role in his decision to retreat to Tientsin (Tianjin).
Aftermath.
Near the end of June, local Boxers (unaffiliated with the Hebei Boxers) charged the British concession in Tianjin, not having learned the lesson from other Boxers' failed mystical offense. Nie Shicheng, who vehemently hated the rioting mobs, was nearby with his army. They stood by as the battle waged on. When the Boxers finally turned back from the Alliance forces under heavy machine gun pressure, Nie Shicheng ordered soldiers of the Wuwei Corps, ironically equipped with British machine guns as well, to spray their fire at the retreating Boxers, virtually annihilating the large mob. He gave the justification of "shooting all deserters". Then Nie finally brought his army to battle against the Alliance forces, but was unable to occupy the concessions.
As a consequence, in July, Nie was shot multiple times by mutinying new recruits in his army that sympathized with the Boxers. Soon afterwards he died under Allied troops' cannon fire; some claim this was a suicide, him having defied orders from pro-Boxer officials in the imperial court; while others regard it as a heroic military death.
References.
 ;templatestyles src="Reflist/styles.css" / ;