Having decided on his fire attack plan, Kongming secretly deployed elite troops to ambush on both sides of Shangfang Valley, while piling gunpowder and kindling inside the valley. He also ordered Wei Yan to feign transporting grain, luring Sima Yi into seizing the supplies. Sima Yi indeed fell for the trap, leading his son Sima Zhao and his generals into the valley. Wei Yan pretended to retreat in defeat, and Sima Yi's soldiers swarmed in. Seeing that the Wei army had all entered the valley, Kongming gave the order, and flaming arrows were fired in unison. Within the valley, fire blazed to the sky, with smoke and flames rising everywhere. Realizing the dire situation, Sima Yi looked up to the heavens and sighed, 'My life is over!' Just as the Wei troops were panicking and seemed doomed to perish in the sea of fire, a dark cloud suddenly rolled in from the northwest corner. Thunder and lightning flashed, a torrential rain poured down, and in an instant, the great fire in the valley was extinguished. Sima Yi, his son, and all the officers and soldiers seized the opportunity to rush out of the valley and escape with their lives. Witnessing this from the mountain, Kongming also looked up to heaven and sighed, 'Man proposes, Heaven disposes. Such is my fate; I cannot force it!' From then on, the two armies engaged in attacks and defenses around the Weinan area, but in the end, Sima Yi held his ground. Running out of provisions, Kongming had no choice but to withdraw his troops. Thus, the Shu army's several Northern Expeditions, locked in stalemate with Cao Wei at Weinan, achieved small victories but ultimately failed to accomplish their full objective.