The place of M. Cocceius Nerva in history is largely that of an intermediary, filling the vacuum following the fall of Domitian and setting the stage for a golden era of Roman history as the first of the '5 Good Emperors'. Born between AD 30 and 35 of a richly traditional consular family, little of Nerva's early life is known, but the prestigious family had played key roles in both late Republican and early Imperial politics. A terribly distant, yet distinguished familial connection to the Julio-Claudians (through Tiberius via marriage) helped thrust Nerva into early political prominence. An apparent disdain for outward ambition and a complete lack of military education or experience certainly helped push Nerva into a trusted role as advisor to several imperial courts.
Under the reign of Nero, Nerva (in his early to mid 30's) was seemingly instrumental in foiling the conspiracy of Piso and was handsomely rewarded for it. Despite the assistance to the much maligned Nero, Nerva does not suffer in the historical record for these actions (likely because the major writers of this period lived during the reign of Trajan and Hadrian, Nerva's adopted heirs). Nerva, having had a statue erected in the imperial palace as part of the reward, also did not suffer with Nero's downfall. Nerva quite possibly may have maintained a healthy friendship with another early Neronian supporter, the future emperor Vespasian. In the turmoil following the 'Year of the Four Emperors' circa AD 68 and 69, Nerva emerged as a leading member of Vespasian's court. As evidenced by his appointment as junior consul to Vespasian in AD 71, the only year in which Vespasian did not hold the ordinary consulship with his son Titus, Nerva was by this point considered an important and influential member of the senatorial elite. Despite any friendship between the two men, the respect for the future emperor was quite apparent by this gesture.
Nerva maintained an advisory position throughout the Flavian reigns of Vespasian, Titus and Domitian. Though evidence is limited, Nerva seemingly played a prominent role in another foiled conspiracy. After the legionary revolt of Saturninus against Domitian, Nerva was elevated to the ordinary consulship once again and received special thanks for his part in revealing the plot (likely because of information provided through a deep intelligence network). The goodwill wouldn't last throughout Domitian's reign, however and Nerva seems to have been in danger of being targeted by the emperor's conspiracy suspicions. By the mid 90's AD, though the reports of the ancients are conflicting (Dio Cassius, Apollonius, Suetonius, Victor and Martial), there seems to have been enough evidence suggesting that Domitian had distanced himself from Nerva, and that only horoscopes predicting Nerva's imminent death prevented Domitian from targeting his advisor. The deaths of other senators and close court advisors during Domitian's 'reign of terror' pushed surviving members of his court into action. By September 18, AD 96 a plot, that was necessarily larger than there is evidence for, came full circle and Domitian was murdered by members of his own household staff.
That very same day, Nerva was elevated to the imperial throne, with speculation that Domitian's own wife and prominent members of the Senate were involved. This speculation included the involvement of Nerva, stemming from the ease of the transition following nearly 30 years of Flavian rule to a sudden and 'unexpected' end without an heir in place. Nerva's position and his quick appointment to replace Domitian certainly must have had some reflection on personal ambition, but not only was he a respected elder statesman of the Senate, but as a member of the Flavian supporters, his selection offered a quick and simple opportunity. As a previous and long standing member of Domitian's supporters, those supporters who remained were appeased by Nerva's selection (as a member of their own faction), and the opposition could rest easy with the understanding that the old and new emperors seemingly had had a falling out anyway. Nerva also agreed upon several measures which would bring back a semblance of Senatorial control to the daily government of the empire. While the 'Republic' had long been dead as a political institution, the new government of Nerva would be more reflective of Augustan principals which left an impression of Senatorial authority.
Perhaps most important consideration, however, in determining Nerva's selection was the age of the new emperor. At least in his mid 60's Nerva was reportedly in poor health and as suggested by Suetonius, only the astrology that predicted Nerva's imminent natural death prevented Domitian from having him executed anyway. This vulnerable status and the fact that Nerva had no direct male heirs with whom to continue another family dynasty, allowed the Senate to use him as an interim emperor, until another suitable candidate could be found. Nerva's complete lack of military experience also prevented a potential for a legionary revolt based on loyalties to slightest generals. Military candidates to the imperial throne such as Trajan understood that Nerva's appointment was a stopgap measure and that the real game was not played by succeeding Domitian but would be won as Nerva's heir.