Washington (CNN) Attorney General William Barr took a beat during a conference at the Justice Department Wednesday to flash his ability to play the bagpipes.

Barr, who is a longtime bagpiper, played a song alongside the NYPD Emerald Society pipe band, which performed just before the attorney general gave his opening remarks at the US Attorneys' National Conference at the Justice Department's headquarters in Washington.

"(My staff was) going to surprise me by having the Emerald Society pipe band come down from New York, but as you know I'm very proficient at -- dare I say the word -- spying ," Barr joked. He went on to say that he then countered the "plot" by planning to play the bagpipes himself.

Barr is known for maintaining humor through difficult situations. After being sworn in as attorney general during the George H.W. Bush administration, Barr surprised guests with a turn on the bagpipe during a reception in the attorney general's conference room.