Conscientious objector
History: Many conscientious objectors have been executed, imprisoned, or otherwise penalized when their beliefs led to actions conflicting with their society's legal system or government. The legal definition and status of conscientious objection has varied over the years and from nation to nation. Religious beliefs were a starting point in many nations for legally granting conscientious objector status.
The earliest recorded conscientious objector, Maximilianus, was conscripted into the Roman Army in the year 295, but "told the Proconsul in Numidia that because of his religious convictions he could not serve in the military". He was executed for this, and was later canonized as Saint Maximilian.
An early recognition of conscientious objection was granted by William the Silent to the Dutch Mennonites in 1575. They could refuse military service in exchange for a monetary payment.
Formal legislation to exempt objectors from fighting was first granted in mid-18th-century Great Britain following problems with attempting to force Quakers into military service. In 1757, when the first attempt was made to establish a British Militia as a professional national military reserve, a clause in the Militia Ballot Act allowed Quakers exemption from military service.
In the United States, conscientious objection was permitted from the country's founding, although regulation was left to individual states prior to the introduction of conscription.

International law: 

Universal Declaration of Human Rights: In 1948, the issue of the right to "conscience" was dealt with by the United Nations General Assembly in Article 18 of the Universal Declaration of Human Rights. It reads:

Everyone has the right to freedom of thought, conscience and religion; this right includes freedom to change his religion or belief, and freedom, either alone or in community with others and in public or private, to manifest his religion or belief in teaching, practice, worship and observance.
The proclamation was ratified during the General Assembly on 10 December 1948 by a vote of 48 in favour, 0 against, with 8 abstentions.

In 1974, the Assistant Secretary-General of the United Nations, Seán MacBride said, in his Nobel Lecture, "To the rights enshrined in the Universal Declaration of Human Rights one more might, with relevance, be added. It is 'The Right to Refuse to Kill'."
In 1976, the International Covenant on Civil and Political Rights entered into force. It was based on the Universal Declaration of Human Rights, and was originally created in 1966. Nations that have signed this treaty are bound by it. Its Article 18 begins: "Everyone shall have the right to freedom of thought, conscience and religion."
However, the International Covenant on Civil and Political Rights left the issue of conscientious objection inexplicit, as in this quote from War Resisters International: "Article 18 of the Covenant does put some limits on the right [to freedom of thought, conscience and religion], stating that [its] manifestations must not infringe on public safety, order, health or morals. Some states argue that such limitations [on the right to freedom of thought, conscience and religion] would [derivatively] permit them to make conscientious objection during time of war a threat to public safety, or mass conscientious objection a disruption to public order, ... [Some states] even [argue] that it is a 'moral' duty to serve the state in its military."
On 30 July 1993, explicit clarification of the International Covenant on Civil and Political Rights Article 18 was made in the United Nations Human Rights Committee general comment 22, Paragraph 11: "The Covenant does not explicitly refer to a right to conscientious objection, but the Committee believes that such a right can be derived from article 18, inasmuch as the obligation to use lethal force may seriously conflict with the freedom of conscience and the right to manifest one's religion or belief." In 2006, the committee has found for the first time a right to conscientious objection under article 18, although not unanimously.
In 1997, an announcement of Amnesty International's forthcoming campaign and briefing for the UN Commission on Human Rights included this quote: "The right to conscientious objection to military service is not a marginal concern outside the mainstream of international human rights protection and promotion."
In 1998, the Human Rights Commission reiterated previous statements and added "states should ... refrain from subjecting conscientious objectors ... to repeated punishment for failure to perform military service". It also encouraged states "to consider granting asylum to those conscientious objectors compelled to leave their country of origin because they fear persecution owing to their refusal to perform military service ..."
In 2001, Charter of Fundamental Rights of the European Union recognised the right to conscientious objection.

Handbook on Procedures and Criteria for Determining Refugee Status: The Handbook on Procedures and Criteria for Determining Refugee Status (the Handbook) of the Office of the United Nations High Commissioner for Refugees (UNHCR) states:

171. Not every conviction, genuine though it may be, will constitute a sufficient reason for claiming refugee status after desertion or draft-evasion. It is not enough for a person to be in disagreement with his government regarding the political justification for a particular military action. Where, however, the type of military action, with which an individual does not wish to be associated, is condemned by the international community as contrary to basic rules of human conduct, punishment for desertion or draft-evasion could, in the light of all other requirements of the definition, in itself be regarded as persecution.

National law: 

United States: At least two state constitutions have recognized an individual right not to bear arms.  Pennsylvania's Constitution of 1790 states "Those who conscientiously scruple to bear arms, shall not be compelled to do so; but shall pay an equivalent for personal service."  New Hampshire's Constitution of 1784 states "No person, who is conscientiously scrupulous about the lawfulness of bearing arms, shall be compelled thereto."

Selective conscientious objection: Air Commodore Lionel Charlton, of the British Royal Air Force (RAF), served in the military from 1898 to 1928. In 1923 he selectively refused to serve in the RAF Iraq Command. (He later went on to serve as Air Officer Commanding No 3 Group.)
On 4 June 1967, John Courtney Murray, an American Jesuit priest and theologian, delivered an address at Western Maryland College concerning a more specific type of conscientious objection: "the issue of selective conscientious objection, conscientious objection to particular wars, or as it is sometimes called, discretionary armed service."
On 8 March 1971, the Supreme Court of the United States ruled in the case of Gillette v. United States that "the exemption for those who oppose 'participation in war in any form' applies to those who oppose participating in all war and not to those who object to participation in a particular war only."
On 14 September 2003, in Israel, 27 reserve pilots and former pilots refused to serve in only specific missions. These specific missions included "civilian population centers" in "the [occupied] territories". These pilots clarified: "We ... shall continue to serve in the Israel Defense Forces and the Air Force for every mission in defense of the state of Israel."
On 25 May 2005, journalist Jack Random wrote the following: "The case of Sergeant Kevin Benderman (Iraq War Resister) raises the burning issue of selective conscientious objection: While it is universally accepted that an individual cannot be compelled against conscience to war in general, does the same hold for an individual who objects, in the depths of the soul, to a particular war?"

Religious motives: Cases of behavior which could be considered as religiously motivated conscientious objection are historically attested long before the modern term appeared. For example, the Medieval Orkneyinga Saga mentions that Magnus Erlendsson, Earl of Orkney – the future Saint Magnus – had a reputation for piety and gentleness, and because of his religious convictions refused to fight in a Viking raid on Anglesey, Wales, instead staying on board his ship singing psalms.
The reasons for refusing to perform military service are varied. Many conscientious objectors cite religious reasons. Unitarian Universalists object to war in their sixth principle "The goal of world community with peace, liberty and justice for all". Members of the Historic Peace Churches such as Quakers, Anabaptists (Mennonites, Amish, Old Order Mennonite, Conservative Mennonites, the Bruderhof Communities and Church of the Brethren), as well as Holiness Pacifists such as the Reformed Free Methodist Church, Emmanuel Association of Churches, the Immanuel Missionary Church and Church of God (Guthrie, Oklahoma), object to war from the conviction that Christian life is incompatible with military action, because Jesus enjoins his followers to love their enemies and to refuse violence. The Book of Discipline of the Reformed Free Methodist Church teaches:

Militarism is contrary to the spirit of the New Testament and the teachings of Jesus Christ. Even from humanitarian principles alone, it is utterly indefensible. It is our profound and God-given conviction that none of our people be required to participate in war of any form and that these God-given convictions of our members be respected.
Since the American Civil War, Seventh-day Adventists have been known as non-combatants, and have done work in hospitals or to give medical care rather than combat roles, and the church has upheld the non-combative position.