U.S. Attorney General Eric Holder has been released from a Washington, D.C., hospital after being taken there via ambulance as a precaution Thursday morning.

The Department of Justice said Holder had been feeling faint and was short of breath and had an elevated heart rate when he arrived at MedStar Washington Hospital Center.

Holder had been meeting with his senior staff at 9:30 a.m. when he said he wasn't feeling well. He excused himself and went into his office, where he decided he should go to a hospital.

"It was nothing sudden or traumatic," said an official.

Holder was taken to the hospital by ambulance, according to a Department of Justice official, and was there a little less than three hours. An initial report indicated Holder was taken to the hospital by his security detail.

Holder reportedly joked with paramedics on the ride to the emergency room.

Shortly after his arrival, the DOJ released a statement which said in part: "During his regular morning meeting with senior staff, the Attorney General began experiencing symptoms including faintness and shortness of breath. As a precaution, the Attorney General was taken to MedStar Washington Hospital Center to undergo further evaluation."

An official said Holder was "doing fine," is alert and had approved the DOJ's statement.

Holder was released around 1:15 p.m. Thursday and went home to rest after receiving a full range of tests, a second official statement said.

A Justice Department official said Holder was joking with paramedics on the way to the hospital, and told them he walks five flights of stairs to his office every morning.

An avid basketball player, Holder is 63 and has been in good health. However, the DOJ said Holder had experienced similar symptoms several years ago, but in a milder form that didn't require serious medical attention.

An official said Holder had been feeling under the weather all week, so this morning's episode may be related to that, reported NBC News' Pete Williams.

Holder had been scheduled to attend President Barack Obama's My Brother's Keeper event Thursday.