Justinian II (Greek: Ἰουστινιανός, romanized: Ioustinianos; Latin: Flavius Iustinianus Augustus; 668 – 11 December 711), surnamed the Rhinotmetos or Rhinotmetus (ὁ Ῥινότμητος), was the last Byzantine Emperor of the Heraclian dynasty, reigning from 685 to 695 and again from 705 to 711. Justinian II was an ambitious and passionate ruler who was keen to restore the Roman Empire to its former glories, but he responded brutally to any opposition to his will and lacked the finesse of his father, Constantine IV. Consequently, he generated enormous opposition to his reign, resulting in his deposition in 695 in a popular uprising, and he only returned to the throne in 705 with the help of a Bulgar and Slav army. His second reign was even more despotic than the first, and it too saw his eventual overthrow in 711, abandoned by his army who turned on him before killing him.
Justinian II was the eldest son of Emperor Constantine IV and Anastasia. His father raised him to the throne as joint emperor in 681 on the fall of his uncles Heraclius and Tiberius. In 685, at the age of sixteen, Justinian II succeeded his father as sole emperor.
Due to Constantine IV's victories, the situation in the Eastern provinces of the Empire was stable when Justinian ascended the throne. After a preliminary strike against the Arabs in Armenia, Justinian managed to augment the sum paid by the Umayyad Caliphs as an annual tribute, and to regain control of part of Cyprus. The incomes of the provinces of Armenia and Iberia were divided among the two empires. In 687, as part of his agreements with the Caliphate, Justinian removed from their native Lebanon 12,000 Christian Maronites, who continually resisted the Arabs. Additional resettlement efforts, aimed at the Mardaites and inhabitants of Cyprus allowed Justinian to reinforce naval forces depleted by earlier conflicts. In 688, Justinian signed a treaty with the Caliph Abd al-Malik ibn Marwan which rendered Cyprus neutral ground, with its tax revenue split.
Justinian took advantage of the peace in the East to regain possession of the Balkans, which were before then almost totally under the heel of Slavic tribes. In 687 Justinian transferred cavalry troops from Anatolia to Thrace. With a great military campaign in 688–689, Justinian defeated the Bulgars of Macedonia and was finally able to enter Thessalonica, the second most important Byzantine city in Europe.
The subdued Slavs were resettled in Anatolia, where they were to provide a military force of 30,000 men. Emboldened by the increase of his forces in Anatolia, Justinian now renewed the war against the Arabs. With the help of his new troops, Justinian won a battle against the enemy in Armenia in 693, but they were soon bribed to revolt by the Arabs. The result was that Justinian was comprehensively defeated at the Battle of Sebastopolis, caused by the defection of most of his Slavic troops, while he himself was forced to flee to the Propontis. There, according to Theophanes, he took out his frustration by slaughtering as many of the Slavs in and around Opsikion as he could lay his hands on. In the meantime, a Patrician by the name of Symbatius proceeded to rebel in Armenia, and opened up the province to the Arabs, who proceeded to conquer it in 694–695.
Meanwhile, the Emperor's bloody persecution of the Manichaeans and suppression of popular traditions of non-Chalcedonian origin caused dissension within the Church. In 692 Justinian convened the so-called Quinisext Council at Constantinople to put his religious policies into effect. The Council expanded and clarified the rulings of the Fifth and Sixth ecumenical councils, but by highlighting differences between the Eastern and Western observances (such as the marriage of priests and the Roman practice of fasting on Saturdays) the council compromised Byzantine relations with the Roman Church. The emperor ordered Pope Sergius I arrested, but the militias of Rome and Ravenna rebelled and took the Pope's side.
Justinian contributed to the development of the thematic organization of the Empire, creating a new theme of Hellas in southern Greece and numbering the heads of the five major themes- Thrace in Europe, Opsikion, the Anatolikon, and Armeniakon themes in Asia Minor, and the maritime corps of the Karabisianoi- among the senior administrators of the Empire. He also sought to protect the rights of peasant freeholders, who served as the main recruitment pool for the armed forces of the Empire, against attempts by the aristocracy to acquire their land. This put him in direct conflict with some of the largest landholders in the Empire.
While his land policies threatened the aristocracy, his tax policy was very unpopular with the common people. Through his agents Stephen and Theodotos, the emperor raised the funds to gratify his sumptuous tastes and his mania for erecting costly buildings. This, ongoing religious discontent, conflicts with the aristocracy, and displeasure over his resettlement policy eventually drove his subjects into rebellion. In 695 the population rose under Leontios, the strategos of Hellas, and proclaimed him Emperor.  Justinian was deposed and his nose was cut off (later replaced by a solid gold replica of his original) to prevent his again seeking the throne: such mutilation was common in Byzantine culture. He was exiled to Cherson in the Crimea. Leontius, after a reign of three years, was in turn dethroned and imprisoned by Tiberius Apsimarus, who next assumed the throne.
While in exile, Justinian began to plot and gather supporters for an attempt to retake the throne. Justinian became a liability to Cherson and the authorities decided to return him to Constantinople in 702 or 703. He escaped from Cherson and received help from Busir, the khagan of the Khazars, who received him enthusiastically and gave him his sister as a bride. Justinian renamed her Theodora, after the wife of Justinian I. They were given a home in the town of Phanagoria, at the entrance to the sea of Azov. Busir was offered a bribe by Tiberius to kill his brother-in-law, and dispatched two Khazar officials, Papatzys and Balgitzin, to do the deed. Warned by his wife, Justinian strangled Papatzys and Balgitzin with his own hands. He sailed in a fishing boat to Cherson, summoned his supporters, and they all sailed westwards across the Black Sea.
As the ship bearing Justinian sailed along the northern coast of the Black Sea, he and his crew became caught up in a storm somewhere between the mouths of the Dniester and the Dnieper Rivers. While it was raging, one of his companions reached out to Justinian saying that if he promised God that he would be magnanimous, and not seek revenge on his enemies when he was returned to the throne, they would all be spared. Justinian retorted: "If I spare a single one of them, may God drown me here".
Having survived the storm, Justinian next approached Tervel of Bulgaria. Tervel agreed to provide all the military assistance necessary for Justinian to regain his throne in exchange for financial considerations, the award of a Caesar's crown, and the hand of Justinian's daughter, Anastasia, in marriage. In spring 705, with an army of 15,000 Bulgar and Slav horsemen, Justinian appeared before the walls of Constantinople. For three days, Justinian tried to convince the citizens of Constantinople to open the gates, but to no avail. Unable to take the city by force, he and some companions entered through an unused water conduit under the walls of the city, roused their supporters, and seized control of the city in a midnight coup d'état. Justinian once more ascended the throne, breaking the tradition preventing the mutilated from Imperial rule. After tracking down his predecessors, he had his rivals Leontius and Tiberius brought before him in chains in the Hippodrome. There, before a jeering populace, Justinian, now wearing a golden nasal prosthesis, placed his feet on the necks of Tiberius and Leontios in a symbolic gesture of subjugation before ordering their execution by beheading, followed by many of their partisans, as well as deposing, blinding and exiling Patriarch Kallinikos I of Constantinople to Rome.
His second reign was marked by unsuccessful warfare against Bulgaria and the Caliphate, and by cruel suppression of opposition at home. In 708 Justinian turned on Bulgarian Khan Tervel, whom he had earlier crowned Caesar, and invaded Bulgaria, apparently seeking to recover the territories ceded to Tervel as a reward for his support in 705. The Emperor was defeated, blockaded in Anchialus, and forced to retreat. Peace between Bulgaria and Byzantium was quickly restored. This defeat was followed by Arab victories in Asia Minor, where the cities of Cilicia fell into the hands of the enemy, who penetrated into Cappadocia in 709–711.
He ordered Pope John VII to recognize the decisions of the Quinisext Council and simultaneously fitted out a punitive expedition against Ravenna in 709 under the command of the Patrician Theodore. The expedition was led to reinstate the Western Church's authority over Ravenna, which was taken as a sign of disobedience to the emperor, and revolutionary sentiment. The repression succeeded, and the new Pope Constantine visited Constantinople in 710. After receiving Holy Communion at the hands of the pope, he renewed all the privileges of the Roman Church. Exactly what passed between them on the subject of the Quinisext Council is not known. It would appear, however, that Constantine approved most of the canons. This would be the last time a Pope visited the city until the visit of Pope Paul VI to Istanbul in 1967.
Justinian's rule provoked another uprising against him. Cherson revolted, and under the leadership of the exiled general Bardanes the city held out against a counter-attack. Soon, the forces sent to suppress the rebellion joined it. The rebels then seized the capital and proclaimed Bardanes as Emperor Philippicus; Justinian had been on his way to Armenia, and was unable to return to Constantinople in time to defend it. He was arrested and executed outside the city in December 711, his head being sent to Bardanes as a trophy.
On hearing the news of his death, Justinian's mother took his six-year-old son and co-emperor, Tiberius, to sanctuary at St. Mary's Church in Blachernae, but was pursued by Philippicus' henchmen, who dragged the child from the altar and, once outside the church, murdered him, thus eradicating the line of Heraclius.
Justinian's reign saw the continued slow and ongoing process of transformation of the Byzantine Empire, as the traditions inherited from the ancient Latin Roman state were gradually being eroded. This is most clearly seen in the coinage of Justinian's reign, which saw the reintroduction of the Loros, the traditional consular costume that had not been seen on Imperial coinage for a century, while the office itself had not been celebrated for nearly half a century. This was linked to Justinian's decision to unify the office of consul with that of emperor thus making the Emperor the head of state not only de facto but also de jure. Although the office of the consulate would continue to exist until Emperor Leo VI the Wise formally abolished it with Novel 94, it was Justinian who effectively brought the consulate as a separate political entity to an end. He was formally appointed as Consul in 686, and from that point, Justinian II adopted the title of consul for all the Julian years of his reign, consecutively numbered.
Though at times undermined by his own despotic tendencies, Justinian was a talented and perceptive ruler who succeeded in improving the standing of the Byzantine Empire. A pious ruler, Justinian was the first emperor to include the image of Christ on coinage issued in his name and attempted to outlaw various pagan festivals and practices that persisted in the Empire. He may have self-consciously modelled himself on his namesake, Justinian I, as seen in his enthusiasm for large-scale construction projects and the renaming of his Khazar wife with the name of Theodora. Among the building projects he undertook was the creation of the triklinos, an extension to the imperial palace, a decorative cascade fountain located at the Augusteum, and a new Church of the Virgin at Petrion.
Justinian, a 1998 novel by Byzantine scholar Harry Turtledove, writing under the name HN Turteltaub, gives a fictionalized version of Justinian's life as retold by a fictionalized lifelong companion, the soldier Myakes. In the novel, Turtledove speculates that while in exile Justinian had reconstructive surgery done by an itinerant Indian plastic surgeon to repair his damaged nose.