During the 22nd century, the Valakians suffered from a plague that was killing off its entire population. In 2149, the plague was responsible for causing 12 million deaths on Valakis, causing the Valakians to dispatch numerous spacecraft to seek help from offworlders.
By 2151, while they did not possess warp technology, they were capable of launching multiple impulse-powered spacecraft. At some previous point, they had already made First Contact, when their world was visited by warp-capable ships from two other races: the Ferengi and the M'klexa. Neither race established a long-term presence or gave them access to warp technology.
The Enterprise encountered a Valakian impulse ship in 2151 and rendered medical aid to the incapacitated crew. When the crew explained that their pre-warp race had nonetheless already made contact with ships from passing alien races, the Enterprise command crew decided that it was acceptable to openly visit Valakis (the danger of cultural contamination had already occurred, regardless of what Enterprise did).
Enterprise offered to aid in search for a cure and while they were visiting the planet, the ship's doctor, Phlox, discovered that the epidemic wasn't being caused by a virus or bacteria. Instead, the illness was genetic; the proteins that bind to Valakian chromosomes were deteriorating. This had been going on for thousands of years but the rate of mutation had accelerated over the last few generations. Based on his projections, Phlox predicted that the Valakians would be extinct by the 24th century.
Furthermore, Phlox discovered that the Menk had the potential to become the dominant species on the planet. The Enterprise crew, believing survival of the genetically fittest was the noblest of ideals, refused to save any lives.
Ruling that the Valakians could not deal with warp technology on their own yet, Enterprise Captain Jonathan Archer further declined to give warp technology to the Valakians for the purpose of finding a cure. As a result, the entire species was sentenced to ultimately become extinct. (ENT: "Dear Doctor")