The Nigeria Football Federation(NFF) and Keshi have long been in contract negotiations,with both parties failing to reach an agreement over a new deal.
Keshi last week said that he was done negotiating with the NFF,revealing last week that he will consider other offers for him rather than waiting for Nigeria.
Emmanuel Ado,Keshi's agent revealed that the sports minister Tammy Danagogo pleaded with Keshi to handle the team for the qualifiers until a substantive agreement is reached.
"I want to announce that we have reached an agreement between Keshi and the minister of sports," said Ado.
"The agreement is all about Nigeria. And as a patriotic Nigerian, Keshi has no choice than to answer to the appeal of Mr President.
"Talks will resume after the two matches, but my client and brother has agreed to take charge of the games, so as to avert any form of disaster."
Nigeria will play either Congo DR or Rwanda on September 6,before the Super Eagles will travel to Cape Town for their game on September 10.