After much badgering from the Hillary Clinton campaign, Barack Obama has agreed to participate in two debates prior to the March 4 primaries.

Obama accepted NBC’s invitation to debate Clinton on Feb. 26 at Cleveland State University in Ohio, and agreed to another in Texas before March 4 that was not on Clinton’s list. Both states vote on March 4.

“As Barack Obama travels throughout Texas and Ohio … he looks forward to having a conversation with Hillary Clinton before voters about the choice they face in this race,” Obama campaign manager David Plouffe said in a statement. “As with the 18 debates and numerous forums Obama has already participated in, we believe this debate will provide the largest number of voters in upcoming primaries the chance to compare the candidates one-on-one.”

The Obama camp was initially reticent to commit to debates, even when Clinton campaign manager Patti Solis Doyle wrote a letter to Plouffe Thursday announcing it had accepted five invitations to debates from television networks, including FOX News.

“After seven years of a Bush administration that has left the economy struggling and our health care system in crisis, Americans are certainly facing their fair share of challenges and deserve to hear how the candidates for the nomination will address them,” Solis Doyle wrote. “As such, I was disappointed to see that Senator Obama rejected the idea of having more debates given the fact that he and Senator Clinton have had only a single one-on-one debate. I think we can do better and so does Hillary.”

Obama and his staffers had been asked repeatedly if they would also agree to participate in the debates. Both staffers and Obama did not give yes or no answers, but hinted they would probably not agree to all of the offers.

Earlier Thursday on a flight from Louisiana to Nebraska, Obama was asked again about the then-unresolved matter.

“I’ve got to spend time with voters. We’ve got seven primaries in seven days. You know, Senator Clinton’s better known in a lot of these states. I’ve got to do more work on the ground. But we’ll have more debates,” he said. “It is very important for me to have voter contact. What we’ve seen is in those states where I have time to campaign and people have a chance to meet me, I do better.”

FOX News’ Bonney Kapp contributed to this report.