(CNN) -- John McCain on Thursday called Barack Obama's attitude toward veterans benefits "a convenient campaign pledge" and wrote off the Illinois senator's criticisms of him as "cheap shots."
John McCain said Barack Obama used the Senate floor to take "cheap shots" at him.
After Obama criticized McCain's opposition to expanding the GI Bill, McCain issued a statement accusing Obama of using "the Senate floor to take cheap shots at an opponent and easy advantage of an issue he has less than zero understanding of."
The legislation, an updated version of the GI Bill, passed the Senate Thursday afternoon by a 75-22 vote margin and passed the House earlier this month by a similar margin. It proposes to essentially provide a full scholarship to in-state public universities for members of the military who have served for at least three years.
Obama on Thursday questioned McCain's stance on the measure.
"I respect Sen. John McCain's service to our country ... but I can't understand why he would line up behind the president in opposition to this GI Bill. I can't believe why he believes it is too generous to our veterans. I could not disagree with him and the president more on this issue," he said while on the Senate floor.
"There are many issues that lend themselves to partisan posturing, but giving our veterans the chance to go to college should not be one of them."
Obama said he thinks the expansion of the GI Bill would "strengthen our military and improve the number of people who are interested in volunteering to serve."
McCain supports enacting legislation to expand education benefits for veterans, but he, as well as President Bush and much of the military brass, oppose this specific measure because they worry it will deplete retention rates among those currently serving in the military at a time when recruitment efforts are already struggling.
"I will not accept from Sen. Obama, who did not feel it was his responsibility to serve our country in uniform, any lectures on my regard for those who did," he said in the statement.
"Perhaps, if Sen. Obama would take the time and trouble to understand this issue he would learn to debate an honest disagreement respectfully. But, as he always does, he prefers impugning the motives of his opponent, and exploiting a thoughtful difference of opinion to advance his own ambitions. If that is how he would behave as president, the country would regret his election."
"Unlike Sen. Obama, my admiration, respect and deep gratitude for America's veterans is something more than a convenient campaign pledge. I think I have earned the right to make that claim," he said.
In his statement, McCain said it would have been easier for him to join Sen. Jim Webb, who introduced the GI Bill, but he said there are some key differences between that legislation and what he, Sen. Lindsey Graham and Sen. Richard Burr have proposed.
"The most important difference between our two approaches is that Sen. Webb offers veterans who served one enlistment the same benefits as those offered veterans who have re-enlisted several times. Our bill has a sliding scale that offers generous benefits to all veterans, but increases those benefits according to the veteran's length of service," he said.
McCain argues this difference will help prevent those in service from leaving after one enlistment.
His measure was killed by Senate Democrats last week.
McCain and Obama have sparred multiple times in recent days, in what could be a preview of the general election should Obama secure his party's nomination.
Earlier this week, McCain faulted Obama for downplaying the threat from Iran and again called the Democratic front-runner's judgment "reckless."
Obama quickly responded during a speech in Billings, Montana, asking why McCain was afraid to talk to Iran and that it was the "Bush-McCain" war policy in Iraq, not diplomacy, that would make Iran stronger.
Obama struck McCain hard last Friday, saying President Bush and McCain "have a lot to answer for" over the war in Iraq and the failure to find Osama bin Laden and al Qaeda's continuing strength, among other continuing foreign policy problems.
The McCain campaign responded in a statement:
"It would be a wonderful thing if we lived in a world where we don't have enemies. But that is not the world we live in, and until Sen. Obama understands that, the American people have every reason to doubt whether he has the strength, judgment and determination to keep us safe."
CNN's Alex Mooney contributed to this report.
All About U.S. Presidential Election