Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

This story was prepared in partnership with The Virginian-Pilot.

A U.S. Navy SEAL trainee died last week after passing out in a military training pool in California, NBC News has learned.

The Navy had not announced the training death, which occurred Friday, until after officials were contacted Tuesday by NBC News and The Virginian-Pilot newspaper in Norfolk. A Navy spokesperson said the death is now under investigation.

The sailor, Seaman James Derek Lovelace, 21, was undergoing basic underwater demolition/SEAL training, better known as BUD/S, Navy officials said. It’s considered to be among the world’s most challenging military training regimens.

Seaman James Derek Lovelace, 21, died during basic underwater demolition/SEAL training, better known as BUD/S. U.S. Navy

A U.S. official familiar with the matter said Lovelace was in the last day of the first week of BUD/S in Coronado, near San Diego, participating in a basic swimming exercise commonly known as "drown-proofing."

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

“It’s a physiological test to see if a guy can do exercises in the water,” the official said.

During the exercise, Navy spokesman Trevor Davids said in a statement, “students tread water and swim in a pool while wearing diving masks and a camouflage utility uniform.” During a later phase of BUD/S, trainees endure much more strenuous drills in the water.

Davids said that “safety observers identified Lovelace as having difficulty and withdrew him from the exercise. He was aided to the edge of the pool by instructors where he then lost consciousness. Resuscitation efforts and first aid at the scene were unsuccessful. He was pronounced dead at a local hospital.”

You can reach Ken Dilanian at ken.dilanian@nbcuni.com

"Our heartfelt condolences go out to the family and friends of SN Lovelace," said Capt. Jay Hennessey, commanding officer of the Naval Special Warfare Center, which oversees SEAL training. "Though Derek was very new to our community, he selflessly answered his nation's call to defend freedom and protect this country. He will be sorely missed. We share in his family's grief from this great loss."

Lovelace's awards and decorations include the National Defense Ribbon and Sharpshooter Pistol Qualification, the Navy said. He’d enlisted in the Navy only six months ago.

He played baseball at Faulkner State Community College in Bay Minette, Alabama, and Crestview High School in Crestview, Florida, according to a family obituary.

"I don't know what to say. He was wonderful,” said his sobbing grandmother, Jan Pugh, in a telephone interview from Florida. “It was a dream he was chasing out there. He was determined to become a SEAL…We are all just in shock."

His mother, Katie Lovelace, had passed away in June 2015 at the age of 44.

His father, James Lovelace, is an Air Force veteran employed by Lockheed Martin, a defense contractor, according to his LinkedIn page. He and other family members were flying to San Diego on Tuesday and couldn’t be reached, Pugh said.

Lovelace is also survived by two sisters.