Q

Q is an omnipotent, all-powerful entity and a recurring antagonist from the Star Trek franchise. He has primarily appeared in The Next Generation though has also appeared in one episode of Deep Space Nine and three episodes of Voyager. Q possesses godlike powers and is capable of doing virtually anything, though he generally uses his vast power to cause mischief and annoy others.

Origins
Q is but one of a race of such omnipotent beings known as the Q, residing on a plane of existence known as the Q Continuum. According to him, the Q have always existed, having no true origin or end. The purpose of the Q is said to be maintaining order in the cosmos, but Q himself, time and again, has proven to be an agent of chaos. He has frequently imposed himself upon various denizens of the galaxy, typically out of boredom, using his powers to play pranks and generally cause mischief all for his own entertainment.

First Contact with Humanity
In the year 2364, Q made his first contact with the human race, appearing before the crew of the USS Enterprise NCC-1701-D under the command of Captain Jean-Luc Picard. He placed Picard and his crew on trial for the crimes of humanity, deeming them to be a "dangerous, savage child-race" and warning them to return to their home system or be destroyed. As a duly-appointed representative of Earth, Picard bargained with Q by requesting that the Enterprise crew be allowed to prove that humanity had evolved beyond their previous warmongering ways. Q agreed and observed the Enterprise's mission to Farpoint Station from behind the scenes, though fully expected the humans to fail. The Starfleet crew investigated Farpoint Station, which had been offered to the Federation by the Bandi, and discovered that the entire base was actually a space-dwelling lifeform capable of synthesizing matter and altering its form. Picard and his crew released the lifeform and allowed it to reunite with its mate, and so they passed Q's test. Q allowed the Enterprise to continue its voyage, but promised that he would return one day.

The Game
Later that very same year, Q re-appeared aboard the Enterprise-D and forced the crew to participate in a deadly war game. The purpose behind this visit was to gain an understanding of humanity's desire for exploration, and so during this game, Q granted the godly powers of the Q to William T. Riker, First Officer of the Enterprise. Q wanted Riker to join the Continuum so they could understand and possess this desire because, if they did not, humanity could one day surpass the Q. Q and Picard settled on a bet that if Riker rejected his offer, the Q would leave humanity alone forever. Ultimately, Riker rejected his new powers, and Q was forced back into the Continuum.

Banishment
In 2365, Q revisited the Enterprise after being cast out of the Q Continuum. Bored of wandering the universe alone, he offered his services as a guide for Picard and his crew. Picard refused to allow Q to join his crew, stating that they did not trust him, but Q argued that the Federation wasn't prepared to face the many dangers of the galaxy. To prove his point, he used his power to hurl the Enterprise into a distant area of space far from Federation territory, straight into the path of a Borg cube. Not having encountered the Borg before then, the Enterprise found itself incapable of fighting off the aggressive alien ship and suffered heavy casualties. The Borg almost destroyed the Enterprise, but at the last minute Picard admitted to Q that he and his crew truly weren't ready to face this kind of threat. Satisfied with Picard's admission, Q returned the Enterprise to Federation space. However, this incident led to the Borg learning of the existence of the Federation and launching an invasion the following year.

In 2366, Q was stripped of his omnipotence and immortality and transformed into a human by the Q Continuum, as punishment for his irresponsibility. He sought refuge on the Enterprise, requesting asylum and protection from those beings in the universe whom he had tormented. Although Captain Picard and the rest of the crew were unconvinced of the sincerity of Q's plea (and indeed suspected that the entire situation was merely an elaborate prank), Picard agreed to provide Q temporary asylum. Although not a scientist, Q provided theoretical guidance for Geordi La Forge's analysis of Bre'el IV's moon, which was in danger of colliding with its planet of orbit. During this time, Data was assigned to watch Q, and Q gained an unusual perspective on humanity and its condition from observing Data, in turn. However, after a Calamarain attack nearly destroyed Data (who risked his life to protect Q), Q resolved to leave on a shuttle, allowing the Calamarain to kill him and preventing further risk to the Enterprise crew. Another Q intervened at this point, acknowledged Q's selfless act and restored Q's powers as a reward. In gratitude, Q corrected the orbit of the moon and also gave a special gift to Data, his "professor of the Humanities" – a brief moment of genuine laughter.

Vash
In 2367, Q returned to the Enterprise once again to properly thank Captain Picard and his crew for helping Q regain his status within the Continuum. At the time, Picard was meeting a past lover named Vash, whom he'd met on Risa the year before. Q resolved to teach Picard a lesson about love, and cast Picard, Vash, and the Enterprise command crew into an elaborate scenario styled by the ancient legend of Robin Hood. Q himself assumed the role of the Sheriff of Nottingham. Ultimately, Picard learned and everyone was returned to the Enterprise. Intrigued by Vash, though, Q offered to take her on a journey of exploration to various archaeological ruins of the galaxy, and she accepted. To pay his debt to Picard, he promised no harm would come to Vash. Q and Vash spent the better part of two years exploring the galaxy together, but during that time Vash had grown weary of Q's antics and wanted nothing more to do with him. She and Q parted ways in the Gamma Quadrant and she would be picked up by the USS Ganges and taken to Starbase Deep Space 9, bringing with her various treasures of an ancient alien civilization. Q followed Vash back to DS9 and while there, mysterious power drains began occuring all over the station. The power failures were believed to be Q's doing, but they were, in fact, due to an embryonic lifeform that Vash had unknowingly brought back from the Gamma Quadrant. Q also had a brief confrontation with Commander Benjamin Sisko during his visit and disrupted an auction that Quark and Vash staged in Quark's Bar. Although he was intrigued by Sisko hitting him, Q eventually got bored because "Sisko was so different than Picard". One might speculate that his actions were intended to ensure Vash's safety in regards to the promise made to Picard two years earlier. In the end, Vash and Q went their separate ways, though both eventually admitted to retaining a certain fondness for each other.

Amanda Rogers
In 2369, Q appeared once again aboard the Enterprise, this time to meet the young Amanda Rogers who was working as an intern for the ship's chief medical officer, Doctor Beverly Crusher. Amanda, as it turned out, was a Q who had been born outside of the Q Continuum and had lived her life until then as a human, but revealed her true nature to the Enterprise crew after she used her powers to stop a warp core breach. Q claimed he had appeared in order to teach Amanda how to use her powers without putting others at risk, but he had actually been sent by the Continuum to ascertain whether or not Amanda was a true Q or some kind of hybrid. If the latter was so, the Continuum intended to execute her as they had done her parents.

Amanda was offered the choice of returning to the Q Continuum or remaining aboard the Enterprise, but Q warned her that she would have to refrain from using her powers in order to stay, suggesting that she may not be able to resist the temptation. This turned out to be true as Amanda used her Q powers to restore the heavily-polluted atmosphere of the planet Tagra IV rather than let its population be wiped out. Realizing she could no longer pretend to be human, Amanda left with Q.

The Death of Jean-Luc Picard
Several months after Q's previous visit, Captain Picard was seemingly killed on an away mission when his artificial heart was damaged. Picard found himself in a white space standing before Q, who claimed that he was God and showed Picard what had become of him. He offered Picard the opportunity to relive a crucial moment of his past and try to change events in order to prolong his life. Picard accepted the offer and found himself reliving the time shortly after he graduated from Starfleet Academy when he was on leave at Starbase Earhart. It was there and then that Picard had originally suffered a near-fatal injury after picking a fight with a group of Nausicaans, leading to his heart needing to be replaced. Q's second chance allowed Picard to alter this fate, but as a result of altering his past, Picard found that his altered life was much more mundane than it was previously. Picard pleaded with Q to let him go back to his previous life despite knowing that he would die, and Q granted his request. Picard found himself reliving the moment of his heart injury again, as it had gone before, and suddenly he woke up in the Enterprise's sickbay surrounded by his friends.

Never-Ending Trial
In late 2370, Q returned to the Enterprise to continue the trial against humanity. Claiming that the seven-year-old trial had never actually ended, Q proclaimed humanity guilty of "being inferior" and informed Picard that his race was to be destroyed. He sent Picard traveling through time to his own past and present, as well as to a potential future. In all three time periods, Picard was presented with a temporal paradox, in the form of an eruption of anti-time in the Devron system. In this paradox, Picard himself was responsible for the creation of the anomaly, which propagated backwards in normal time (anti-time having the opposite properties of normal time), thus destroying humanity in the past. However, in addition to sending Picard jumping through time, Q also provided Picard with hints to understanding the nature of the paradox. Ultimately, Picard determined the solution and devised a way to close the anti-time anomaly in all three time periods. Following the success, Q revealed that the entire experience had been a test devised by the Continuum, aimed at determining whether humanity was capable of expanding its horizons to understand some of the advanced concepts of the universe, including the potential of humanity's own evolution – but helping Picard was his idea. Q promised to continue watching humanity, proclaiming that "the trial never ends."

Quinn
In 2372, Q was sent by the Continuum to board the USS Voyager, whose crew had unintentionally released a renegade Q from confinement in a rogue comet. When the other Q (later known as "Quinn") asked for asylum on Voyager in order to fulfill his wish to commit suicide (an act considered illegal in the Continuum), Q was permitted to represent the Continuum at a hearing to determine whether the requested asylum would be granted. Q argued that permitting a Q to commit suicide would cause unspeakable chaos and disorder – a profound irony, considering Q's own history as a prankster and renegade. (When confronted with his past deeds, Q commented that "[his] record has been expunged.")

Ultimately, Quinn's arguments prevailed, and he was made into a mortal being. Q himself was touched by Quinn's dedication and beliefs – Quinn had previously been an admirer of Q's, because of Q's propensity to stir controversy and cause disorder – and actually provided Quinn with the means with which to commit suicide. Q resolved to return to some of his old habits, and to encourage the Continuum to allow more chaos in their own order.

Q Civil War
Following the death of Quinn, a massive Q Civil War broke out, as the forces of the status quo resisted the calls for change in the Continuum, by a faction led by Q himself. Seeking to end the conflict, Q devised a plan to mate with Kathryn Janeway, the captain of Voyager, in order to create a new Q/Human hybrid – a new breed of Q that would help bring an end to the civil war. Janeway, however, flatly refused.

Q then kidnapped Janeway and took her to the Continuum, where he again tried to persuade her, by explaining the nature of the conflict. However, Janeway again declined (though she openly sympathized with Q for his inability to understand love), and attempted to negotiate a truce between the two sides. These negotiations failed, however, because the status quo faction refused to accept any terms other than surrender. They attempted to execute both Q and Janeway, but they were stopped by personnel from Voyager, with the assistance of a female Q, an old flame of Q's. Q and the female Q were able to equip Janeway and the rest of Voyager's crew with Q weapons, which they were able to use to battle the opposing status quo faction.

Q then proposed mating with his old girlfriend (instead of with Janeway) and she agreed. The new child, nicknamed Junior, became the first child born in the Continuum for millennia, and his presence brought an end to the civil war.

Junior
Q's child, however, did not prove to become the perfect "savior" child that he was meant to be. Junior grew into a spoiled brat, causing chaos and disorder. Q tried to briefly leave his son with "Aunt Kathy" aboard Voyager, hoping that Janeway's "vaunted Starfleet ideals" would rub off on him. Q himself began to learn more about the role of being a parent (revealing that much of Junior's actions were not punished properly by Q). However, after spending years with the child, Junior only began to behave worse. As a result, the Continuum stripped his son of his powers and left him aboard Voyager, again under the care of Janeway, telling him to reform his ways within a week or Junior would be sentenced to spend eternity as an Oprelian amoeba.

Although Q was initially unimpressed by his son's progress, he devised a test of "Q-ness" to determine whether his son had improved his attitude. He masqueraded as a Chokuzan captain and threatened Junior and his friend Icheb after they stole the Delta Flyer II from Voyager. Junior passed with flying colors, offering to sacrifice himself to face the consequence of his actions, which had endangered Icheb.

However, the Continuum was not impressed by Junior's progress, and sentenced him to remain Human. Outraged, Q proclaimed that he would leave the Continuum if his son was not allowed to rejoin – the pair was a "packaged deal." "Begging for [Q's] return" as a deterrent to instability (Q earlier stated that he "holds them all together"), the Continuum acquiesced, on one condition – that Q retain eternal custody of the boy. Grateful for her assistance, Q provided Janeway with a map to a shortcut that would shave three years off Voyager's journey home. Janeway asked Q why he didn't send them all the way back to Earth, his response being that it would be setting a bad example for his son if he did all the work for them.

Personality
Q is quirky, mischievous and often underhanded. He often flaunts his power without concern for the consequences and considers himself superior to other forms of life, which is understandable as he is omnipotent and all-powerful. While he has developed a reputation for being a prankster, a liar and a manipulator, Q has also demonstrated a softer side to his nature. Despite repeatedly expressing his low opinion of humanity, he has continued to observe human behaviour - particularly that of Jean-Luc Picard - with rapt fascination, seeing a potential within humanity that they themselves have yet to realise.

Powers
Q is capable of doing anything. Altering his shape, teleporting, creating illusions, conjuring objects out of thin air and even altering time and space on a whim, Q can do it all.