NASA has already harvested a variety of edible leafy greens, grown without earthly gravity or natural light. Soon, researchers plan to expand to a more difficult crop, Española improved chiles, in their quest to answer one of the most pressing questions of a Mars mission: How will astronauts get enough nutritious food to survive years in the unforgiving depths of space?

Scientists believe the project, if successful, could open the door to growing similar crops in space — think tomato plants and strawberries — and perhaps eventually to more advanced foods, like potatoes.

“This is the most complex crop we have done to date for food purposes,” said Matthew W. Romeyn, who is leading the pepper experiment for NASA.

The peppers are being tested on Earth, he said, and could be sent to space as early as next spring.

Scott Kelly, a retired astronaut who set an American record in 2016 when he returned after spending 340 days in space, said he received a shipment of fresh fruit and vegetables every few months while on the International Space Station. But that would not be possible on a trip to Mars.