WASHINGTON — Amid a heavy barrage of advertising by opposing “super” political groups, President Barack Obama’s re-election campaign spent more than it collected in June.

Still, although outraised again by Republican Mitt Romney, Obama ended the month with a hefty $97.5 million in the bank.

June was the second consecutive month in which Romney brought in more money than Obama, finance reports filed Friday show. Romney’s money advantage prompted Obama’s campaign advisers to warn this month that the president could lose the election if the financial disparity continued.

Obama tried to answer the super PACs supporting Romney by spending $38.2 million on television advertising. Romney spent less than a third of that — $10.4 million — on TV time.

Romney’s campaign nearly doubled its spending in June compared with the previous month, underscoring the proximity of the November general election in which Republicans hope to unseat Obama and, in part, dismantle the president’s signature health care overhaul.

Much of Romney’s financial advantage — he raised $106 million last month with the help of the Republican Party — came from larger donations in a handful of battleground states.