President Obama reached out to crucial young voters here and in Chapel Hill, N.C., on Tuesday with a promise to keep college affordable, in the first two of three campus appearances in battleground states this week spotlighting this key voting group.

Speaking to capacity crowds at the University of North Carolina’s flagship campus and later in the day at the University of Colorado, Obama made his case that congressional leaders must take action before July to prevent interest rates on federal student loans from doubling. On Wednesday, the president will give a similar address at the University of Iowa.

“College education is one of the best investments America can make for our future,” Obama said in Chapel Hill. “This is important for all of us. We can’t price most Americans out of a college education. We can’t make higher education a luxury. It’s an economic imperative. Every American should be able to afford it. So that’s why I’m here.”

Obama and the presumptive Republican nominee, Mitt Romney, now agree that student loan rates should remain low. Both are, not coincidentally, also ferociously courting young voters, who turned out overwhelmingly for Obama four years ago but are less enthusiastic about politics, and more worried about their futures, today.

Romney weighed in on the college issue Monday, and his campaign hosted a conference call with surrogates Tuesday to decry how the president has “failed” young Americans — revealing how important his campaign believes the youth vote will be now that the general election is underway.

Still, the hero’s welcome Obama received in Chapel Hill and Boulder on Tuesday — crowds shouted “Amen!” and chanted “Four more years!” — illustrated how powerful the president’s advantage remains among young voters. The events had the feel of campaign rallies, although they were labeled official White House events (and paid for by taxpayers). In Chapel Hill, the president also taped an appearance on “Late Night with Jimmy Fallon,” whose audience skews young.

Obama’s challenge is not so much winning these voters; he won among 18-to-29-year-olds in 2008 by a 34-point margin, and most polls predict he will win the group again easily this year. Rather, it is to draw out as many of them as possible on Election Day. This is especially true in competitive states such as North Carolina, which the president won with a razor-thin margin of roughly 14,000 votes four years ago.

On Monday, senior White House officials, speaking on the condition of anonymity to be candid, confirmed as much, noting that a key goal of the president’s reelection effort is to register as many new young voters — those between the ages of 18 and 21 who were too young to vote in 2008 — as they can.

Romney’s comments Monday partly neutralized the contrast between Democrats and Republicans on the issue of student loans — except when it comes to paying for the initiative, which is expected to cost $6 billion.

Romney’s embrace of the idea is at odds with some of his pronouncements earlier in the Republican nomination contest, when he said, for instance, that the government should not be spending more money to help pay for college. Romney also has not addressed the issue of how to pay for keeping loan rates low.

The president took advantage of that opening in his remarks Tuesday, drawing attention to Republican lawmakers’ — and Romney’s — support of deep cuts to the federal budget.

Obama also called on Congress to extend a tuition tax credit he pushed when he first took office to safeguard financial aid for low-income students, such as the Pell Grant program, and to double the number of work-study jobs available over the next five years.

Obama’s decision to push the student loan issue fits in with a larger contrast his campaign is trying to draw with Romney and Republicans — that he is more focused on the concerns of the middle class while his opponent wants to gut popular federal programs in order to extend tax cuts for the rich.

“Do we want to keep tax cuts for the wealthiest Americans, or do we want to make sure they’re paying their fair share?” Obama asked. “Do we want to keep subsidizing Big Oil, or do we want to make sure we’re investing in clean energy? Do we want to jack up interest rates on millions of students, or do we want to keep investing in things that will help us and help them in the long run?”

A week after he prompted headlines with the comment that he was not born with a silver spoon in his mouth, the president drew yet another contrast with Romney’s privileged background by noting that he and the first lady, Michelle, did not finish paying off their student loans until eight years ago.

According to the White House, the average student loan debt is $25,000 and on the rise and Americans now owe more tuition debt than credit card debt. Obama’s proposal would affect 7.4 million students, saving them an average of about $4,000 over the lifetime of four years’ worth of federally subsidized Stafford loans.

The rates on those loans were reduced to 3.4 percent in 2007, but they are scheduled to double for new loans on July 1. Democratic lawmakers in both chambers have proposed bills that would extend current rates another year, but some Republicans have resisted the $6 billion price tag.

Senate Democrats plan to push legislation to extend the lower loan rates during the week of May 7, but some Republicans have indicated opposition to a Democratic suggestion to pay for the bill by ending a payroll tax exemption for some small businesses.

Staff writer Rosalind S. Helderman in Washington contributed to this report