Actress Julia Louis-Dreyfus, center, actor Tony Hale, left, actress Anna Chlumsky, and actor Matt Walsh star in the HBO comedy series “Veep.” (Bill Gray/AP)

HBO announced on Thursday that it will move the production of “Veep,” its political comedy starring Julia Louis-Dreyfus, out of Maryland to Southern California.

“After four years and a long deliberation we have decided to move the production of Veep to Los Angeles,” said Cecile Cross-Plummer, an HBO spokesman, in a statement. “Maryland has been home to many vital HBO projects, from The Corner to The Wire to Game Change, and the support has always been extraordinary. The producers and HBO would like to thank Maryland for making the last four seasons of Veep such a success. We look forward to returning with another production in the future.”

The decision by the cable network was a coup for California, which has been trying to woo television productions back to Hollywood through tax incentives.

This month, the California Film Commission said “Veep” was one of four television series that was granted $27.6 million in tax credits through an expanded tax program from the state.

California, which tripled its tax incentive for television and film production last year to $330 million, has been aggressively trying to get “Veep” and other television shows to set up production studios in Southern California. Meanwhile, Maryland was considering getting rid of its tax-credit program and Gov. Larry Hogan (R), who has made creating and retaining jobs a top priority, had raised questions about its benefits before he took office.

The production company for “Veep,” which has filmed in Columbia, Baltimore and Sykesville, has received $13.9 million in tax credits from Maryland over the past three seasons. The production company has hired 3,069 Maryland residents and used 2,882 businesses, according to state officials.

It wrapped up its fourth season in Maryland in December.

Earlier this year, the Maryland General Assembly approved a bill that will extend the state’s tax-credit program beyond its scheduled termination on June 30, 2016.

The bill requires Hogan to appropriate money to the reserve fund for the tax credit, but it does not specify how much would be set aside. The bill will go into effect next month without a signature from the governor.

Doug Mayer, a spokesman for Hogan, said job creation remains the governor’s primary goal.

“Maryland has had a long and beneficial relationship with HBO for over two decades, and we look forward to continuing our partnership on future productions,” he said.