Just as a clarification, the fact that it seems that Neanderthals and modern humans may have produced viable offspring does not mean that they were the same species.
As an example: lions and tigers can produce viable offspring despite being separate species, with more divergence than modern humans and neanderthals.
It is still being debated by smarter people than me whether neanderthals were a separate species.
By "viable" do you mean offspring that are reproductively fertile? Because the various hybrids of lions and tigers are almost invariably sterile. Unlike dogs and wolves, which can interbreed quite successfully and have offspring that go on to do the same.
Neanderthal were once thought to be sub-species of humans (Homo sapiens neanderthalensis), but in this study, which looked at 1.1 billion DNA fragments from the Neanderthal genome, researchers confirm they were a separate species ( Homo neanderthalensis ).