Despite his coalition holding more seats in both houses, candidates with backing from the opposition People's Democratic Party of recently defeated President Goodluck Jonathan managed to get elected.
Having opponents in powerful positions in the legislature will not make newly elected President Muhammadu Buhari's job any easier, especially since his own coalition is made up of politicians from many different political persuasions, including defectors from the PDP.
The biggest blow came with the election of former governor and two-term Sen. Bukola Saraki as head of Nigeria's Senate — the third most powerful figure in the country.
Saraki ostensibly belongs to Buhari's coalition but he was not its choice for Senate president and instead engineered his own election with the backing of the opposition when the president's supporters were absent.
Party officials say Buhari was meeting with his party's senators, when Saraki pushed for a vote in the Senate with the help of the clerk who said the 57 senators present (out of 108) constituted a quorum.
While Saraki had defected to Buhari's side last year, it was his old colleagues in the PDP that voted him in.
Later that day, another PDP candidate Yakubu Dogara was elected head of the House of Representatives, narrowly defeating the candidate of Buhari's coalition once again.
The two victories for the PDP could be a sign that it is rebuilding its power base following its electoral defeat and could pose a threat to Buhari just days after his May 29 inauguration.
Saraki, 52, was a two-term governor of Kwara state best known abroad for importing white Zimbabwean farmers to develop commercial agriculture in his state, a move that he said has transformed Kwara from a food importer to an exporter.