D.C. firefighters pull a man to safety from a trench that runs along the side of the Eisenhower Executive Office Building at 17th Street and Pennsylvania Avenue NW on Thursday. (D.C. Fire and EMS)

A man in his 40s fell about 10 feet Thursday morning into a recessed area along the side of the Eisenhower Executive Office Building, next to the White House, and had to be rescued by firefighters using ladders.

Several fire engines, a rescue truck and ambulances responded to the emergency call. The District has firefighters who specialize in rescuing people from confined spaces or in other perilous predicaments.

The incident occurred on the secure grounds of the White House complex near 17th Street and Pennsylvania Avenue NW, and drew dozens of spectators.

A spokesman for the D.C. fire department, Vito Maggiolo, said the incident happened shortly after 11 a.m. It was unclear how the man fell into the trench, and officials did not say if the man works at the complex.

The Eisenhower building is below street level and surrounded by a three- to four-foot-wide trenchlike recess. Someone walking along the building’s perimeter could fall into the trench.

Fire officials said the man injured his leg and could not climb out. Firefighters placed ladders into the recess and used a hoist to pull the man up to ground level. He was taken to a hospital.

Authorities said the rescue response did not include extra personnel or apparatuses because the call was at the White House. A minor assault and traffic accident nearby drew other police and fire vehicles.