Lunar-focused company Masten Space Systems filed for Chapter 11 bankruptcy protection on Thursday, with the venture winnowed down to a handful of people after layoffs and furloughs.The space company declared as its debts ballooned, tracing back to a NASA contract awarded to Masten two years ago. Once seen as a major win for the small business, the NASA deal left Masten over budget, as well as unable to raise funds or pay employees.Masten predates many of the companies that came up during the past decade’s boom of private investment in the space sector. The company long had a reputation in the industry as a gritty shop for young engineers to cut their teeth on rocket and spacecraft technologies at facilities in the Mojave Desert, near NASA’s Armstrong center and Edwards Air Force Base.While Masten has a history of demonstrating impressive hardware, the company’s bankruptcy showcases the delicate balancing act required for long-term growth and success in the harsh, capital-intensive space industry. Raising money for high-risk space projects is difficult, and achieving them even more so.Founded in 2004, Masten regularly won small contracts and prizes to test and develop reusable spacecraft that could takeoff and land, especially for the surface of the moon. The company had an unofficial motto: “Shut up and fly.”Masten had won a number of NASA contracts – but most notable was the $75 million award in 2020 to deliver eight scientific payloads on a mission to the Moon’s South Pole. At the time of the award, Masten had about 15 people on staff.The NASA contract was going to be Masten Mission 1, or MM1. It would fly scientific payloads on the company’s Xelene lunar lander, scheduled for 2023. Masten signed a contract with Elon Musk’s SpaceX to launch MM1. People familiar with the matter, speaking anonymously due to the sensitive nature of the matter, told CNBC that Masten began quickly scaling up to build the lander.But the award was immediately problematic for Masten, as it had written the proposal to NASA before the Covid pandemic struck. The company needed to immediately adjust assumptions about which technologies would be developed in-house, as opposed to purchased, and vendors were unwilling to make commitments due to uncertainty around the new pandemic environment, according to people familiar with the matter.To avoid going over budget, Masten needed to augment the NASA contract with additional payloads on the missions to hit even aggressive cost estimates. But the total MM1 budget still ended up exceeding cost expectations. As development continued, Masten anticipated the mission would be anywhere from $10 million to $30 million over budget, those people said.In early 2021, Masten’s board and senior management began an effort to raise up to $60 million in outside capital. The company previously had raised little else than small sums from angel investors. But the effort never found a lead investor, and Masten remained on a knife’s edge. The company operated in survival mode for most of its existence, living contract-to-contract and re-investing any profits into the business. The new paradigm added a new level of pressure.Masten last year scaled up to about 120 employees and contractors on staff, but the lack of funds and mounting debt stifled further progress. The board of directors effectively removed CEO Sean Mahoney in January. People familiar with the situation said a Covid-related NASA payment of $1.4 million in February merely kept the company solvent a little longer. NASA distributed funds as a part of the broader federal disaster relief program to U.S. businesses.The company then laid off 20 people in June, those people said, with 15 from the MM1 team specifically. In July, Masten furloughed nearly all the remaining employees at the company, as reported by Mojave-based blog Parabolic Arc and confirmed by CNBC.A NASA spokesperson wrote in a statement to CNBC that the agency “received notification its payloads slated for delivery aboard Masten Mission One may be impacted by Masten business operations.””In the event Masten Space Systems is unable to complete its task order, NASA will manifest its payloads on other CLPS flights,” the agency said.To date, NASA has paid $66.1 million of the contract for Masten’s mission.The company has between 50 and 99 creditors, according to Thursday’s filing, and estimates its assets are worth between $10 million and $50 million, with debts between $10 million to $50 million.SpaceX has the largest unsecured claim to Masten’s debt, with $4.6 million unpaid as a vendor. A number of suppliers and other space companies are listed as large creditors – such as Airbus and Astrobotic – with debts each of $500,000 and up.Masten’s filing specified that, among its property, immediate attention is needed for explosive and hazardous chemicals. Intuitive Machines, another lunar-focused company, gets first dibs on Masten’s launch contract with SpaceX, as a result of a “stalking horse asset purchase agreement.”A Masten representative did not respond to CNBC’s request for further comment on the bankruptcy.