(CNN) - Luxury sports car maker Aston Martin is getting a much-needed cash infusion.
The British company, whose cars are featured in James Bond movies, says Italian private equity firm Investindustrial will take a 37.5 percent stake in the carmaker in exchange for $240 million in capital investment.
The new influx of cash comes at just the right time.
Last month, Moody's warned it was considering downgrading Aston Martin's debt, out of concern the carmaker couldn't make a $22 million bond payment due next month.
Aston Martin is one of the few niche car companies still in existence.
It has struggled to keep up with rivals Ferrari, which is owned by Fiat, and Porsche, which is part of the Volkswagen group.