CINCINNATI—The E.W. Scripps Co. returned to profitability in the third quarter, thanks to sharply higher political advertising revenue and contributions from TV stations it bought in 2011.

The newspaper publisher and TV station owner earned $12 million, or 21 cents per share, in the July-September quarter. In the same period last year, it lost $10.7 million, or 19 cents per share.

Revenue rose 31 percent to $219.6 million from $167.9 million a year ago, the company said Friday.

Analysts, on average, forecast earnings of 11 cents per share on revenue of $212.6 million, according to a poll by FactSet.

Scripps owns newspapers such as the Ventura County Star in California and The Commercial Appeal of Memphis, Tenn. Its stations include WCPO in Cincinnati and WPTV in West Palm Beach, Fla.

The quarter’s results include revenue from TV stations in Indianapolis, Denver, San Diego and Bakersfield, Calif., that the company acquired on Dec. 30, 2011. Without the new stations, revenue would have grown 15 percent, to $193 million. Revenue from political TV ads grew to $33.9 million from $2 million a year earlier.

The company’s shares rose 90 cents, or 8.9 percent, to $11.07 in morning trading. The stock has traded in a 52-week range of $7.52 and $11.46.

Colorado energy regulators on Monday proposed tighter rules for shutting down oil and gas pipelines after a fatal explosion blamed on natural gas leaking from a line that was thought to be out of service but was still connected to a well.