NEW YORK — President Obama, delivering a commencement address to nearly 600 graduates of Barnard College, urged young women Monday to strive for leadership positions and become politically involved.

“You are now poised to make this the century where women shape not only their own destiny, but the destiny of this nation and of this world,” Obama said at the women’s college.

“Don’t just get involved. Fight for your seat at the table. Better yet, fight for a seat at the head of the table,” he told the graduates.

Obama used the speech to hone his message to women in a year in which their issues have been front and center in politics. The graduates gave him a rousing welcome and greeted his speech with cheers and applause.

The Obama reelection campaign has intensively targeted female voters in the wake of national debates over contraception and working mothers, trying to draw a distinction between the president’s beliefs and those of presumptive Republican nominee Mitt Romney. Polls show that Obama maintains a wide lead over Romney among female voters.

During his remarks, Obama invoked his daughters — 13-year-old Malia and 10-year-old Sasha — to emphasize that he has a personal stake in the debate over legal protections to ensure that women earn salaries equal to men’s and receive health-care benefits that include contraception coverage.

“We know we are better off when women are treated fairly and equally in every aspect of American life, whether it’s the salary you earn or the health decisions you make,” said Obama, who wore a pale blue gown with black stripes and a red sash around his neck.

“How far your leadership takes this country, how far it takes this world, well, that will be up to you,” he added. “You’ve got to want it. It will not be handed to you.”

Obama pointedly mentioned female Cabinet members, including Secretary of State Hillary Rodham Clinton and Labor Secretary Hilda L. Solis, and he encouraged the graduates to pursue leadership positions, whether in politics, business or other fields.

He also talked about his personal history, being raised by a single mother, and he praised first lady Michelle Obama, noting that she was a successful lawyer when they met.

He touted the Lilly Ledbetter law, his administration’s first legislative victory, which allows women more time to pursue legal recourse for pay equal to that of their male colleagues.

The president personally requested the speaking appearance in February, and Barnard President Debora Spar made room by asking New York Times Executive Editor Jill Abramson, who had been scheduled to speak, to step aside.

Obama graduated from Columbia College, located across the street, and his half-sister, Maya Soetoro-Ng, attended Barnard.

After Obama’s address, he taped an appearance on the ABC talk show “The View” for a segment that will air Tuesday in which he discussed his recently announced support for same-sex marriage.

Obama also raised money for his campaign, stopping at two New York City fundraising events — one hosted by the lesbian, gay, bisexual and transgender community and openly gay singer Ricky Martin, and the other at the home of Hamilton “Tony” James, president of the Blackstone Group, which is one of the nation’s largest private equity firms.

Two hundred guests paid $5,000 or more each at the first event, and about 60 paid the campaign maximum of $35,800 at the second.

“I want everyone treated fairly in this country,” Obama said, speaking about his support for same-sex marriage at the first event. “We have never gone wrong when we’ve extended rights and responsibilities to everybody. That doesn’t weaken families, that strengthens families.”

Romney delivered a commencement address at Liberty University in Lynchburg, Va., on Saturday in which he emphasized that he believes marriage is between “one man and one woman.”

Obama’s stop at James’s home came a week after JPMorgan announced a $2 billion loss from risky practices, and it came on the same day that Obama’s campaign released a television advertisement attacking Romney’s record on job creation during his tenure at his private equity firm, Bain Capital.

Staff writer William Branigin in Washington contributed to this report.