Once Kongming had devised his fire attack plan, he secretly dispatched elite troops to ambush on both sides of the Upper Valley, where gunpowder and combustible materials were piled inside the valley. He also ordered Wei Yan to lead troops pretending to transport grain, luring Sima Yi to seize the supplies. Sima Yi indeed fell for the trap and led his son Sima Zhao and other generals into the valley. Wei Yan feigned defeat and retreated, while Sima Yi’s soldiers swarmed in. Seeing that the Wei army had entered the valley completely, Kongming gave the order; fire arrows were shot simultaneously, and within the valley flames soared to the sky, smoke and fire raged everywhere. Realizing the dire situation, Sima Yi looked up to the sky and lamented: 'My fate is sealed!' Just as the Wei army was in panic and helpless, seemingly doomed to perish in the sea of fire, suddenly a dark cloud rolled in from the northwest corner, thunder and lightning flashed, and a pouring rain fell, instantly extinguishing the great fire in the valley. Sima Yi, his son, and all the officers and soldiers took the opportunity to rush out of the valley and escape with their lives. Witnessing this from the mountain, Kongming also looked up and sighed: 'Man proposes, Heaven disposes'; such is my destiny, I cannot force it!' From then on, the two armies engaged in attacks and defenses along the south of the Wei River. However, Sima Yi ultimately held his ground; Shu's army ran out of provisions, and Kongming had no choice but to withdraw. Thus, Shu's several northern expeditions, confronting Cao Wei south of the Wei River, though achieving small victories, ultimately failed to accomplish the full objective.