It was Jury Duty: Celebrity Edition in Baltimore Circuit Court on Tuesday.

Both Michael Phelps and chef Duff Goldman had their numbers picked for the jury pool at the downtown courthouse.

Phelps’ presence created such a buzz that other prospective jurors and employees throughout the courthouse started streaming in to take his picture, according to Maj. Sam Cogen of the sheriff’s office.

“People were using their cell phones [to take pictures], bothering him — including police,” Cogen said. “We had to intervene and do a general announcement reminding people about conduct in the courthouse.”

Photographs aren’t allowed anywhere in the courthouse without approval from the administrative judge. Phelps, who the previous evening had been in Manhattan to accept the athlete of the year award at USA Swimming’s Golden Goggles event, was moved to the “quiet room,” Cogen said.

Phelps had headphones on and largely kept to himself, according to Goldman, of “Ace of Cakes” fame. Goldman passed the time reading a book and posting messages to Twitter.

Goldman said he chatted up some fans, including showing pictures of the cakes his newly opened Los Angeles location is working on. “They said, ‘Don’t leave Baltimore, and I said, I’m not!” Goldman said. “It was fun.”

Celebrities aren’t exempt from jury duty, said Angelita Plemmer, a spokeswoman for the judiciary. “It’s their civic duty to serve, just like anyone else,” Plemmer said.

Goldman said he didn’t get selected for a jury. A representative for Phelps could not be reached for comment.