KahBang, a music, film and arts festival that has been held annually in Bangor, is moving to Portland.

Organizers confirmed the decision Thursday, less than a month before the festival is scheduled to begin, and said the change was necessary to keep the event going.

The scheduled dates, Aug. 7-10, will remain the same. The festival’s music headliners, St. Vincent and DMX, will play Portland’s State Theatre on Aug. 8. The dozen or so other musical acts will play there or at Port City Music Hall.

The move is seen by music and arts proponents as a major gain for Portland.

“Portland really doesn’t have anything like this, so it’s a huge plus for the city,” said Derek Lombardi, director of programming at One Longfellow Square, a music and performance venue on State Street. “I’m really glad they were able to scramble and make this move.”

Organizers were forced to abruptly move the six-year-old festival after being unable to lease or rent a camping area near Bangor, said Joshua Gass, the festival director. KahBang usually partners with a camping area for use by people from out of state who need affordable lodging. Without camping, Gass said, organizers did not think they could attract enough people to Bangor to make the festival financially viable.

“We tried to work out (the camping issue) but it just didn’t come together,” he said.

The Portland version of KahBang will not include a specific camping area, but people who want to camp will be directed to local campgrounds. Gass said camping is not as much of an issue in Portland because it is in a larger population center and many fans won’t have to travel as far to see the shows.

Gass said tickets already purchased will be honored in Portland or refunded.

KahBang organizers had planned to announce the move Friday, but word leaked out a day earlier, so the festival’s website as of midday Thursday did not list Portland locations. The site should be updated in a day or so, Gass said.

Some performers were caught by surprise, including Maine rapper Spose, whose real name is Ryan Peters. Peters said he had not been told of the move as of Thursday, but he’s glad it’s happening.

Peters said he has played the festival every year, and it has always been “poorly attended.” Organizers said they get an average of 3,000 people a day during KahBang, and maybe 7,000 people for the biggest concerts, which were held outdoors on the Bangor waterfront.

By comparison, a day-long music festival featuring Mumford & Sons and St. Vincent, held on Portland’s Eastern Promenade in 2012, drew about 15,000 people.

“I’ve always thought it would make sense to move it out of Bangor,” Peters said. “The people who book KahBang are forward-thinking and they bring in the kind of indie acts that don’t do that well in Bangor.”

KahBang is able to move to Portland quickly at least in part because two of the city’s major music venues, the State Theatre and Port City Music Hall, did not have many shows scheduled for the festival weekend.

Lauren Wayne, who manages both venues and has helped KahBang organizers book their shows in the past, said she purposely did not want to have shows competing with KahBang. She also said several members of her staff wanted to attend KahBang.

“We’ve always liked what they do up there, bringing in emerging acts. We love that,” said Wayne. “So we just didn’t want to compete with that.”

Wayne did have one act, the Fogcutters big band, scheduled for Aug. 8 at Port City Music Hall. That show will now likely be part of the festival, she said.

St. Vincent, an alternative rocker, will play the State Theatre on Friday, Aug. 8, along with rapper DMX, The White Panda and others. Several other bands will play at Port City Music Hall on the Saturday and Sunday of the festival. Schedules and ticket information for those shows can be found at statetheatreportland.com.

One Longfellow Square will host screenings of KahBang’s 30-plus films, Lombardi said. He said summer is slow at One Longfellow Square, so the venue was mostly available. There is a concert on Friday, by the big band Thinking Big, but films will be shown earlier in the day and after the show.

Gass said organizers aren’t sure yet if the move to Portland will be permanent. Most of the KahBang organizers are from the Bangor area and started the festival to bring arts and music to that city.

“It’s bittersweet for us,” said Gass, 34, who works in marketing and social media. “My job is to put on the best event we can and get as many people to it as we can.”