A gunman opened fire during a country music festival in Las Vegas on Sunday night — killing more than 20 people and wounding over 100 with a high-powered assault rifle before being shot by police, according to officials.

Cops confirmed early Monday that the shooter was dead and said they believed he acted alone.

Officials described him as a local Las Vegas resident but offered no other details.

Las Vegas police responded to the Mandalay Bay Hotel and Casino around 10 p.m. after receiving calls about an active shooter targeting concertgoers at the Route 91 country music fest.

About an hour later police confirmed at least one suspect was down.

“This is an active investigation,” they added.

Cops were urging people to avoid the area as SWAT teams searched for the gunman.

Witnesses reported seeing a police officer down, but authorities couldn’t immediately confirm this.

University Medical Center spokeswoman Danita Cohen said the local hospital had taken in “several” people with gunshot wounds. She didn’t offer any more details.

One Las Vegas hospital reported treating at least 20 victims for gunshot wounds, according to KABC.

Professional poker player and Instagram star Dan Bilzerian, who was at the concert, said on his IG story that he saw the shooting unfold and witnessed a girl getting shot right in front of him.

“Holy f–k this girl just got shot in the f–king head,” Bilzerian said. “So f–king crazy…So I had to go grab a gun, I’m f–king heading back…Some kind of mass shooting…Guy had a heavy caliber weapon for sure…Saw a girl f–king get shot in the face right next to me, her brains f–king hanging out.”

Another witness, who spoke to News3LV, recalled how “bullets were flying everywhere” and concertgoers were running.

“They were firing from somewhere high and they were unloading clip after clip after clip after clip,” the man said.

A female concert-goer added, “We all got on the floor, crawling out, rushing.”

Witnesses reported seeing muzzle flashes coming from the upper floors of the Mandalay Bay casino — across from the concert venue — and the sound of automatic gunfire.

Video footage captured at the concert showed festivalgoers cowering in fear and running for their lives as gunshots continue to ring out all around them.

The gunman reportedly opened fire during country music star Jason Aldean’s set, sparking chaos in the crowd.

“The band ran off stage and it was pandemonium,” attendee Jon Bessette told NBC News. “Everyone was running, people were getting trampled.”

Authorities were forced to shut down Las Vegas Boulevard and divert lights on Sunday night as they hunted for the shooter.

Cops reportedly were descending on several casinos and businesses along the Strip during the search.

With Post Wires