Nov 12 (Reuters) - Palantir Technologies Inc beat market expectations in its first quarter as a public company and raised its 2020 revenue forecast on Thursday, as it shored up large government and aerospace contracts.

The data analytics firm, known for its work with U.S. government defense and intelligence agencies, global banks and energy companies, went public in September through a direct listing as opposed to a traditional initial public offering.

Palantir said on Thursday it won 15 new deals in the third quarter, including those from the U.S. Army and National Institutes of Health, as well as a $300 million contract renewal with one of the world's largest aerospace companies.

"The government business had a great quarter ... we're investing far beyond just the army - space force, the navy, air force," Chief Executive Officer Alexander Karp told analysts.

The company, co-founded in 2003 by billionaire Peter Thiel, raised its 2020 revenue forecast to about $1.07 billion, from $1.05 billion to $1.06 billion.

It also said it expects annual adjusted operating income to be between $130 million and $136 million.

Revenue rose 52% to $289.4 million in the quarter ended Sept. 30, exceeding analysts' estimates of $279.4 million, Refinitiv IBES data showed.

Net loss widened to $853.3 million, from a loss of $139.9 million a year earlier, hit by more than $800 million in costs, including expenses related to its direct listing.

On an adjusted basis, the company earned 9 cents per share, beating expectations of 7 cents per share.

Shares of Palantir reversed course to gain about 1% in extended trading after falling 7% earlier.

(Reporting by Munsif Vengattil and Nivedita Balu in Bengaluru; Editing by Aditya Soni)