Luis Medina, a Dominican native living illegally in the United States and under the identity of a dead man,  was able to pass security checks under his assumed name and get inside the Portsmouth Naval Shipyard – home to a repair shop for nuclear submarines.

Medina passed in more than 30 times court records show under the identity of a man who died in 1994. Medina is a fugitive of a drug case in Massachusetts in 2002.

Medina, who had been living in Lawrence, pleaded guilty last week in U.S. District Court in Maine to aggravated identity theft, providing a false document to a government agency, social security fraud and unlawful use of means of identification.

Court records show he obtained a New Hampshire driver’s license under the name of the dead man – Miguel A. Roldan — and used that ID together with a birth certificate and a social security card to pass the shipyard’s security check. He was inside the shipyard in 2015 working for an asbestos abatement company.

Authorities began unraveling the identity fraud in April 2016 when Medina renewed his motor vehicle registration, and a New Hampshire State Police trooper suspected that he did so under an assumed name.

U.S. Immigration and Customs Enforcement determined Medina’s true identity and that he entered the United States in 1991 and became a lawful permanent resident. Authorities also discovered his open 2002 case in Essex County on charges of trafficking and possession of class B with intent to distribute. A warrant was issued in April 2002 after he failed to show up for his trial.

New Hampshire authorities also charged Medina last year after discovering the license fraud. He was convicted of disobeying a police officer and two counts of tampering with a public record. He was sentenced to time served.