As First Lady of the United States, Clinton advocated for gender equality and healthcare reform. Her marital relationship came under public scrutiny during the Lewinsky scandal, which led her to issue a statement that reaffirmed her commitment to the marriage. In 2000, Clinton was elected as the first female Senator from New York. She was reelected to the Senate in 2006. Running for president in 2008, she won far more delegates than any previous female candidate, but lost the Democratic nomination to Barack Obama. During her tenure as U. S. Secretary of State in the Obama Administration from 2009 to 2013, Clinton responded to the Arab Spring by advocating military intervention in Libya. She helped to organize a diplomatic isolation and a regime of international sanctions against Iran in an effort to force curtailment of that country's nuclear program; this would eventually lead to the multinational Joint Comprehensive Plan of Action agreement in 2015. Upon leaving her Cabinet position after Obama's first term, she wrote her fifth book and undertook speaking engagements.