A former sailor was sentenced to nearly four years in prison this week in connection to a fraud scheme worth nearly $400,000, some of which took place while he was still in the Navy, according to the U.S. Department of Justice.

Fedrick Emery, 23, pleaded guilty to conspiracy and aggravated identity theft charges, according to court records.

As part of the plea, he admitted to obtaining credit card numbers and then creating counterfeit credit and gift cards that he used at more than 20 Marine Corps and Navy Exchange locations in San Diego and nationwide, prosecutors said.

He made more than $75,000 worth of purchases at the exchanges from April 2017 to February 2018, according to a prepared statement following his June 28 sentencing.

Emery also stole the identities of four individuals between December 2017 and May 2018 and used their information to obtain more than $290,000 in credit cards, car loans and personal loans, authorities said.

“Emery purchased at least seven luxury automobiles and racked up thousands of dollars in debt that he immediately defaulted on,” the release states.

Emery and his unnamed co-conspirators referred to their scam as “New Money” during the hustle.

“Emery flaunted his unearned wealth on Instagram, posting pictures of himself in the luxury automobiles he purchased using the identities of others, and with stacks of cash,” according to the statement.

Emery’s attorney, Casey Donovan, did not return requests for comment.

He was arrested on May 7, 2018, in El Cajon, California, as he was planning to buy a Jaguar with a driver’s license and other information belonging to someone else, according to a statement by a Naval Criminal Investigative Service agent in Emery’s court records.

Emery admitted paying someone he knew in Chicago $500 for the phony license and paperwork, filings indicate.

Emery told authorities he sold cars for cash and was making $35,000 a month in the process.

Emery is originally from Illinois and served as a culinary specialist seaman from 2014 to his separation under other than honorable conditions in October 2017, according to his service record and the U.S. Department of Justice.