Updated | 11:45 a.m.: CHICAGO – A senior foreign policy adviser and close friend of Senator Barack Obama said today that she was resigning from the campaign, after she apologized for referring to Senator Hillary Rodham Clinton as “a monster.”

Samantha Power, a professor of public policy at the Kennedy School of Government at Harvard, made the comment during an interview in London with The Scotsman, a Scottish newspaper. She derided Mrs. Clinton as a desperate candidate who is “stooping to anything,” according to the newspaper’s account.

“With deep regret, I am resigning from my role as an adviser to the Obama campaign effective today,” Ms. Power said in a statement released by the campaign. “Last Monday, I made inexcusable remarks that are at marked variance from my oft-stated admiration for Senator Clinton and from the spirit, tenor, and purpose of the Obama campaign. And I extend my deepest apologies to Senator Clinton, Senator Obama, and the remarkable team I have worked with over these long 14 months.”

Ms. Power was an unpaid adviser to the campaign, but a member of Mr. Obama’s close inner-circle of academic advisers. She worked for a year as a fellow in his Senate office, advising him on Africa and other foreign policy subject areas.

Ms. Power’s resignation was announced today as Mr. Obama was boarding his campaign plane in Chicago for a flight to Wyoming, where he will spend the afternoon and evening campaigning. He did not speak to reporters and aides said they did not expect him to address the matter.

The swift resignation was designed to contain the story and the fallout.

The derogatory remark violated Mr. Obama’s often-repeated pledge to run a hopeful political campaign, free of gratuitous negativity and name-calling.

The comments came as feelings intensify and harden between Clinton and Obama loyalists in the protracted fight for the Democratic presidential nomination. And her misstep came on the heels of the controversy involving another Obama adviser whose remarks to Canadian officials about Nafta drew heated criticisms from Senator Clinton’s campaign for days before the Ohio primary.

Another comment from Ms. Power has also been attracting notice: During a BBC interview she expressed a lack of confidence that Mr. Obama will be able to carry through his plan to withdraw troops from Iraq within 16 months. The Clinton campaign posted the interview and a transcript on its Web site.