A fifth round of voting by Tory MPs saw Penny Mordaunt narrowly eliminated after a bitter contest in Westminster.
Mr Sunak received 137 votes in the final round, while Ms Truss won 113 votes, just eight more than Ms Mordaunt.
Watch shocking footage of drink and drug driver who caused death of young dad Richie Jordan as partner Carol King pleads for others not to make same mistake
Man arrested after collision leaves 13-year-old boy in critical condition
Sunderland rapist jailed for life as victims reveal horrific ordeal
Thunderstorms: When does the Met Office think thunder and lightning hit Sunderland this week and what does the yellow weather warning mean?
The 13 places where most crime was reported across the north of Sunderland in June
Ms Mordaunt had been second in all previous rounds of voting, but a late surge of support for Ms Truss cost her a place.
The final pair will now face a campaign to win the votes of Tory members nationwide, with the result announced on September 5 and the winner expected to replace Boris Johnson as PM the following day.
Sunderland City Council Conservative group leader Coun Antony Mullen said he was still unsure who would win his backing and he would wait to see what they had to say: "I have not yet made up my mind about which of the two I will vote for,” said the Barnes ward councillor.
"Neither of them is the candidate I was originally supporting and so I will be listening closely over the next two months to hear their policy proposals for government and their plan to win the next general election.
"I will also be interested in seeing what Sunderland voters have to say as the contest goes on.
"In any event, the Conservative Party will give the country either its first non-white or its third female Prime Minister. The Labour Party has got a lot of catching up to do, regardless of who wins."
Bookies have made Liz Truss the favourite to win the contest in the country, but Mr Sunak said he was best placed to beat Labour’s Sir Keir Starmer at the next election.
He said: “We need to restore trust, rebuild the economy and reunite our country.
Ms Truss added: “I am excited to now take to the country to make the case to the Conservative Party about my bold new economic plan that will cut taxes, grow our economy and unleash the potential of everyone in our United Kingdom.”