A high-ranking Navy officer barricaded himself in a luxury Hawaii resort after firing at staff through his hotel room door — shooting himself dead early Sunday after a 10-hour standoff, according to a report.

The man — reportedly a Lieutenant Commander stationed in Oahu — first shot through his door at the Kahala Hotel & Resort in Honolulu  when security knocked on his door at 6 p.m. Saturday, Hawaii News Now said.

NEW MEXICO POLICE OFFICER SHOT IN THE HEAD DURING ROUTINE STOP IN FEBRUARY, NEW VIDEO SHOWS 

He fired at least four more shots when police swamped the hotel and called out his name, police told the outlet, saying no one was hit.

Hundreds of people were evacuated from the immediate area, with many huddling in a makeshift safety room in a ballroom, getting food, drinks and blankets as they huddled down for the night.

Police also cleared the beaches and beachfront eateries through fears the gunman could fire from his hotel balcony, officials told Hawaii News Now.

As SWAT teams swamped the resort, the barricaded man’s commanding officer responded, and his family also helped negotiators, officials told local media.

While police did not reveal what sparked the initial confrontation, one local man told "Good Morning Hawaii" that he was warned to stay away "because of some kind of suicidal man."

He called the scene with "cops with AKs" everywhere "freaking scary."

The standoff eventually ended around 4 a.m. local time — 10 a.m. in New York — when the barricaded man shot himself dead inside the room, "Good Morning Hawaii" said, citing military sources. He was not immediately identified.

Despite reportedly being based around 30 miles from the resort, the military man was staying at the hotel with his family, but was alone in the room during his standoff, police sources told local media.

Images on social media showed locals and hotel guests in tears as officers first rushed the luxury resort and warned off shots fired.

CLICK HERE TO GET THE FOX NEWS APP

"The cops told everyone to run and shelter," Kahala resident Yevgeniy Lendel told Hawaii News Now. "We ran away from the hotel."

Another local, Kaili Lee, praised hotel staff for helping those evacuated from risky areas — saying he was given a room in a safe area during the lengthy drama.

If you or someone you know is having thoughts of suicide, please contact the National Suicide Prevention Lifeline at 1-800-273-TALK (8255).

To read more from the New York Post, click here.