Sweden's Koenigsegg and U.S.-based General Motors said on Tuesday they had inked a deal for the niche sports car maker to buy loss-making Saab Automobile.

The agreement comes after weeks of uncertainty concerning the level of support for the bid from Koenigsegg's backers, after a preliminary deal for the sale was struck in June.

Questions regarding the financing of the deal remain, however, and a statement from GM Europe was vague about the agreed terms beyond calling the deal a stock purchase agreement.

The Swedish government is negotiating with Koenigsegg on a possible guarantee for a loan to Saab from the European Investment Fund, a pre-condition for the deal.

This contract is an important step in the journey to a potential deal, said Carl-Peter Forster, head of GM Europe, in the statement. The closure of the deal is contingent on the funding commitment from the European Investment Bank, guaranteed by the Swedish government.

Koenigsegg spokeswoman Halldora von Koenigsegg told Reuters on Tuesday the firm expected to close the deal within about a month, while GM said it saw the deal closing by the end of the year.

As part of the proposed transaction, GM and Saab will continue to share technology and services during a defined time period. This will be managed through licenses and service agreements, GM Europe said.

Swedish daily Dagens Industri reported on Tuesday that Koenigsegg Chairman Augie Fabela said 3 billion Swedish crowns ($413.6 million) of financing were still required in addition to the EIB loan.

($1=7.253 Swedish Crown)

(Writing by Anna Ringstrom; additional reporting by Jens Hansegard; editing by Simon Jessop)