A Fredericksburg man on Tuesday pleaded guilty in federal court in Alexandria to selling ivory from whales and elephants online, a violation of the Endangered Species Act.

Gary L. Cooper, 60, operated storefronts on eBay and Craigslist in which he claimed he was selling items on behalf of elderly friends in poor health.

“These rare ivories were brought here for centuries legally by tourists and military men and women without any papers,” he wrote one potential buyer, according to court records. “That’s just the situation . . . when buying these Antique Ivories.”

The buyer was an undercover agent with the Fish and Wildlife Service. Selling any piece of ivory across state lines without proper documentation is illegal; since 2016, only ivory proven to be more than 100 years old can be sold.

Among the items Cooper agreed to sell, worth somewhere between $40,000 and $95,000, were two, two-foot-long raw elephant tusks, teeth from a sperm whale and dozens of carvings, including figurines, vases and rings.

He said that he wouldn’t ship internationally because “there’s too much risk” but that discrete domestic sales were relatively safe.

“You have to of course be careful,” he told the undercover agent, according to the court records. “They’ve cracked down everywhere a little bit.”

As part of his plea, Cooper agreed to forfeit 136 pieces of ivory he had attempted to sell. When sentenced on Aug. 31 he could face up to a year in prison.

Court documents do not make clear how Cooper was sourcing the ivory, but in a news release, the Justice Department said he was buying the pieces online and flipping them for profit.

Defense attorney Caleb Kershner said Cooper had collected ivory for decades and began selling it when he ran into financial trouble.

“Mr. Cooper is not a man of means by any stretch,” Kershner said. “This was a way to put food on the table — that’s really the bottom line.”

The most recent report from the United Nations says poaching of elephants peaked in 2011 and has declined since, but the impact on the population remains dire. The International Union for Conservation of Nature deems savanna elephants endangered and forest elephants critically endangered.