President Barack Obama made clear Thursday in a closed-door session with Senate Democrats that he’s prepared to veto hostile legislation from the GOP-controlled Congress, including an Iran sanctions package on the front burner of Capitol Hill.

According to several sources at the Thursday summit in Baltimore, Obama vowed to defend his agenda against Republicans in Congress, promised to stand firm against GOP efforts to dismantle his agenda and called on his Democratic colleagues to help sustain his expected vetoes. The president also was explicit about his opposition to an Iran sanctions bill, promising to veto legislation as his administration is in the midst of multilateral nuclear negotiations with the Middle Eastern regime.

Even though Obama’s position on Iran sanctions differs from that of a number of powerful Democrats, the session, several sources said, was more pep rally than confrontation. Despite his lame-duck status, the president promised that he would not sit on the sidelines in the next two years. He vowed more executive actions to implement his agenda, something bound to provoke anger from Republicans who have called the president’s unilateral moves, particularly on immigration, unconstitutional power grabs.

“I’m not going to spend the next two years on defense; I’m going to play offense,” Obama said, according to two attendees.

The president’s remarks during the Senate Democrats’ retreat at the Hilton hotel near Camden Yards Stadium were warmly received, sources said. The energetic atmosphere was a sharp departure from the tension felt between Senate Democrats and the White House in the aftermath of November’s GOP midterm election rout, attendees said. Obama spent most of the time answering questions, even promoting his trade agenda to many Democrats who oppose his administration’s push on the issue.

At the meeting, Obama, who has rarely used his veto pen in his six years in office, signaled he would henceforth use it repeatedly, including on GOP-sponsored legislation to build the Keystone XL pipeline. Once that measure passes, Republicans have indicated they would soon move to a bill — being drafted by Sens. Mark Kirk (R-Ill.) and Robert Menendez (D-N.J.) — that would impose tough sanctions on the Iranian economy. The White House worries such a provocative move could prompt Iran to back out of a sweeping nuclear deal with the U.S. and other world powers before a June 30 deadline.

White House officials confirmed the veto threat over the Iran bill but declined to comment further. His administration has raised concerns over the Iran measure, but the president appeared to take his opposition a step further in Thursday’s meeting. In January 2014, Obama threatened a veto over a similar Iran sanctions bill, but in the new Congress, the administration has stopped just short of such a threat.

“We in the administration believe that, at this time, increasing sanctions would dramatically undermine our efforts to reach this shared goal” of reducing Iran’s nuclear weapon capacity, said Samantha Power, the U.S. ambassador to the United Nations, at a Louisville event with Senate Majority Leader Mitch McConnell (R-Ky.) earlier this week.

The bill, however, likely has the votes to clear both chambers of Congress.

John Bresnahan contributed to this report.

Follow @politico