North Korean leader Kim Jong Un has taken part in a ceremony to reveal what Pyongyang says is its first submarine capable of launching nuclear weapons.
State media said the sub strengthened the country's nuclear deterrent by "leaps and bounds".
It has been named Hero Kim Kun Ok after a North Korean naval officer and historical figure.
A submarine capable of firing nuclear weapons has long been on the list of weapons North Korea wants to build.
In photographs released by state media, Mr Kim is seen standing in a shipyard, surrounded by naval officers, and overshadowed by an enormous black submarine.
He is quoted as saying that the sub will be one of the navy's main means of "underwater offensive."
"The nuclear attack submarine, which has been a symbol of aggression against our nation for the past few decades, now symbolises our threatening power that strikes fear into our unscrupulous enemies," he said.
But there is some scepticism about how effective it will be.
Analysts believe it is a Soviet-era Romeo-class sub - the same that Mr Kim inspected in 2019 - but has been modified to carry nuclear weapons.
"As a platform, it will have some fundamental limitations and vulnerabilities," said Joseph Dempsey, a researcher at the International Institute for Strategic Studies.
These include being noisy, slow and having limited range, according to Vann Van Diepen, a former US government weapons expert, who spoke to Reuters news agency.
Mr Dempsey said it appears the stern and propellers of the sub have been blurred to hide that it is an old vessel.
We don't know if this submarine is operational. The North Koreans have yet to demonstrate it can successfully fire nuclear-capable missiles.
It is thought the vessel has been designed to carry shorter-range submarine-launched cruise missiles (SLCM), which are capable of striking regional targets.
South Korea has condemned the launch and questioned the sub's capabilities, saying the North may have exaggerated them.
Japan has also expressed unease. Chief Cabinet Secretary Hirokazu Matsuno said North Korea's military activity is "posing graver and more imminent threat to our country's security than before", according to Reuters.
North Korea has also continued regular tests of ballistic and cruise missiles this year, following a significant increase in tests carried out in 2022.
The revelation of the submarine comes days ahead of the 75th anniversary of the North's founding. State media have said a Chinese delegation will be sent to participate in the celebrations.
It also follows reports that Mr Kim plans to travel to Russia this month to meet President Vladimir Putin.
There are concerns that in return, North Korea may seek advanced weapons technology from Moscow.