Updated

WASHINGTON -- The State Department is preparing to spend close to $3 billion to hire a security force to protect diplomats in Iraq after the U.S. pulls its last troops out of the country by year's end.

In testimony Monday before the Commission on Wartime Contracting, Patrick Kennedy, undersecretary of state for management, said the department plans to hire a 5,100-strong force to protect diplomatic personnel, guard embassy buildings and operate a fleet of aircraft and armored vehicles.

Underscoring the security risks in Iraq, five American troops were killed Monday in an attack in Baghdad, the largest single loss of life for the U.S. military there since April 2009.

Fewer than 50,000 U.S. troops remain in Iraq. Under a 2008 U.S.-Iraqi security agreement, all U.S. troops are supposed to leave the country by the end of the year, leaving behind only a small military office to oversee arms sales.

While U.S. officials have expressed a willingness to station a small residual force in the country, it is unclear if the Iraqi government will make the request, which faces strong opposition in Iraq.

A large U.S. diplomatic presence will remain, however, and the departments of state and defense are wrestling with how to provide security for the U.S. Embassy in Baghdad—which is a target of rocket attacks—and diplomatic outposts in the provinces.

A large U.S. diplomatic presence will remain, however, and the departments of state and defense are wrestling with how to provide security for the U.S. Embassy in Baghdad—which is a target of rocket attacks—and diplomatic outposts in the provinces.

Click here to read more on the $3 billion security measures from The Wall Street Journal.