The Treaty of Alliance (also known as the Klingon Alliance) was the official agreement that established the alliance between the United Federation of Planets and the Klingon Empire. Vulcan Ambassador Sarek was one of the key figures behind the negotiations that created the alliance, and his son, Ambassador Spock, was the one who proposed the alliance. (TNG: "Sarek"; VOY: "Alliances") The Treaty was regarded with controversy when first suggested, but later proved to be a cornerstone for peace in the Alpha Quadrant.
The Federation-Klingon alliance represented a fundamental shift in the balance of power in the Alpha and Beta Quadrants, as the two former enemies united. According to the treaty's terms, each side could request the other's assistance in fighting against its enemies. This clause, in part, forced the Romulan Star Empire to the sidelines, unable to compete against the combined forces of the Federation and the Klingons. As a result, the Romulans devoted considerable resources towards trying to break up the alliance, albeit without success. (TNG: "Reunion", "The Mind's Eye") This part of the Treaty, however, did not permit interference in the internal affairs of the signatories. Then-new Klingon Chancellor Gowron requested Federation assistance in the Klingon Civil War of 2368 per the treaty, but the request was declined as it was an internal conflict. (TNG: "Redemption", "Redemption II")
The Treaty allowed the Federation to conduct health and safety inspections of Klingon vessels within Federation space. It also allowed for unrestricted travel by each side in the other's space. (TNG: "Gambit, Part II")
In 2372, the Dominion was able to break the alliance by manipulating the Klingon Empire into an unprovoked invasion of the Cardassian Union, an action condemned by the Federation. The alliance was resumed the following year, after the Dominion joined the Cardassians' war against the Klingons. (DS9: "The Way of the Warrior", "By Inferno's Light")
During the Dominion War, the Dominion worked with the Orion Syndicate on another way to break the alliance. By using Klingon weapons to assassinate an anti-Federation ambassador on Farius Prime, it was hoped Gowron would be implicated and the Klingon people would call for the alliance to end. Fortunately, operatives of Starfleet Intelligence intercepted the plan and alerted the Klingons in time to prevent the assassination. (DS9: "Honor Among Thieves")
Background information Edit
The Treaty of Alliance may have been signed around the same time as the Second Khitomer Accords which were mentioned in Star Trek: Insurrection. Various DS9 episodes seemed to equate the Khitomer Accords with the Treaty of Alliance, implying they were connected in some way.
In "Sarek", William T. Riker said that he learned about the career of Sarek at school and also mentioned the Klingon Alliance as one of Sarek`s achievements. Riker entered Starfleet Academy in 2353; since Starfleet Academy typically took four years to complete, the Treaty of Alliance must have taken place some time prior to his graduation in 2357.
So, if it was signed in the 24th century, as is most likely, it could have happened between 2344 and 2357.
According to dialogue in DS9: "The Way of the Warrior", the events of that episode saw an end to "two decades of peace with the Klingons." Assuming that line is taken literally, that would place the signing of the treaty at 2352, which falls within the above figured timeframe.