Masra, a staunch opponent of the junta, which seized power in April 2021, was appointed prime minister of the transitional government in January, four months ahead of the poll, in a move to appease the opposition.
In March, his candidacy was cleared for the presidential election to return the country to constitutional rule. The oil-producing country is the first of a string of coup-hit states in West and Central Africa's Sahel region to attempt such a return.
Before the official announcement of preliminary results Masra claimed victory, alleging that electoral fraud was being planned.
Chad's state election body said Deby had won the election outright with 61% of the vote and the constitutional council later confirmed him as a winner.
Masra has acknowledged the council's ruling and said there were no other legal means to contest the results.
"In accordance with the constitution, I have today presented... my resignation and that of the transitional government, which has become irrelevant with the end of the presidential election of May 6," Masra said on X on Wednesday.
Deby's victory prolongs the rule of the family that has had a firm grip on power since Deby's father took over in a coup in the early 1990s.
(Reporting by Mahamat Ramadane; Writing by Anait Miridzhanian; Editing by Bernadette Baum)

Chadian Prime Minister and candidate for the presidential elections Succes Masra (C) talks to reporters after casting his vote in the presidential election in NDjamena, Chad, 06 May 2024. Over 8 millions citizens in Chad, a landlocked and arid country of 18 million people in Central Africa, are eligible to cast their votes for the presidential elections on 06 May 2024, according the the national agency in charge of elections. EPA-EFE/CHANCELIN MBAIRAMADJI MOITA