After failing to sell its national airline, India is now pouring in more taxpayer money to keep it flying.

The Indian government handed Air India 21 billion rupees ($305 million) this week, an airline official told CNNMoney on Wednesday.

The additional funds were "an equity infusion to run the carrier," the official added.

The airline, which has been struggling for years, needed a $4.5 billion government bailout in 2012 to avoid shutting down. The Air India official declined to comment on whether the airline would need even more government money.

"Right now this was our requirement so the government has fulfilled it," he said. "In case anything extra will be required then we will see at that time."

India's finance ministry declined to comment and referred questions on Air India to the country's aviation ministry, which did not respond to requests for comment.

Related: Can Air India survive its botched privatization?

Prime Minister Narendra Modi and his government have been trying to privatize the loss-making, debt-ridden airline for over a year. The sale was supposed to be the cornerstone of a wider effort to raise $12 billion by selling state-owned companies.

But a May 31 deadline for private players to express interest in Air India came and went without a single bid.

Jayant Sinha, a senior aviation official, said last month that the government would consider restarting the sale process in the future "depending on what is appropriate given market circumstances."

Until then, he added, the government will make sure it "remains an independent, globally competitive, highly successful airline."

Related: India's $12 billion privatization plan at risk after airline flop

Analysts have said that means spending billions of Indian taxpayer dollars, otherwise Air India — saddled with over $7 billion of debt — may not be able to survive. The Centre for Asia Pacific Aviation, a consultancy, estimates the airline will lose around $2 billion over the next two years.

-- Aayushmaan Thakur contributed reporting