Update: Kelly Knight Craft began her post at the United Nations on Sept. 12.

Kelly Knight Craft, the United States ambassador to Canada , was confirmed on Wednesday to serve as the next ambassador to the United Nations.

More than five months after President Trump announced Ms. Craft as his nominee for the post, the Senate approved the appointment in a 56-to-34 vote largely along party lines, with only five Democrats deciding in her favor.

The post is widely considered the second-most important foreign policy position in a presidential administration, after the secretary of state. But Ms. Craft is stepping into the job at a time of widespread doubts about the Trump White House’s commitment to global institutions like the United Nations.

During Ms. Craft’s confirmation hearing last month, Senator Mitch McConnell, the majority leader, said she was a “phenomenal selection by the president.” But Democrats took issue with Ms. Craft’s relative lack of diplomatic experience as well as her family’s investments in fossil fuels.