At the time, among the thousands of people who migrated to Wei from Shu, many were unregistered residents, so the Wei government wanted to have them officially registered as citizens of Wei. The Wei emperor, Cao Rui, summoned Sima Yi back to Luoyang and sought his opinion on this issue. Sima Yi said: "The enemy seized these people through deception and now abandon them. It's advisable to have them registered. This way, they will feel happy and at ease." Cao Rui then asked him which of Wei's two rival states (Wu and Shu) they should attack first. Sima Yi replied: "The people of Wu know that we are not adept in naval warfare, hence they dare to live in Dongguan. When we attack an enemy, we should always block its throat and strike its heart. Xiakou and Dongguan are the enemy's heart and throat. If we can move our land forces to Wan to lure Sun Quan to advance east, and take advantage of Xiakou's low defences by sending our navy to attack it, it will be like an army from Heaven descending (upon the enemy) and they will definitely be defeated." Cao Rui agreed with Sima Yi's view and ordered him to return to his post at Wan.