Republican Gabriel Gomez and Democrat Edward Markey have staked out positions on a range of issues throughout the state's special U.S. Senate campaign, offering different views on many topics while essentially agreeing on others.

Here's a snapshot of the candidates' positions on key issues in the race to fill the seat formerly held by U.S. Secretary of State John Kerry. The election is Tuesday.

Markey - Has called for a federal ban on the sale of assault weapons and high-capacity magazines along with expanded background checks for gun buyers.

SOCIAL SECURITY

Markey - Opposes any changes to Social Security that would reduce benefits to seniors. Opposes a proposed change in the formula for calculating cost-of-living benefits for Social Security recipients known as chained CPI. Opposes any increase in retirement age.

Gomez - Believes reform is needed to prevent Social Security and other entitlements from falling into insolvency. Has said he would support chained CPI and is open to an increase in retirement age for those not currently near retirement.

Markey - Has called his vote for President Barack Obama's 2010 federal health care overhaul the proudest of his congressional career.

TAX REFORM

Markey - Has called for an end to tax breaks for oil companies and other large corporations. Would be open to lowering corporate tax rate as part of broader tax reform package.

Gomez - Has called for closing some corporate and personal tax loopholes. Supports lowering the corporate tax rate to below 30 percent to encourage more businesses to bring money back into the U.S. to be taxed.

INTERNET SALES TAX

Gomez - Opposes federal law to apply sales tax to purchases on the Internet, saying it would raise costs for consumers and impose burdensome regulation on businesses.

Markey - Supports sales tax on Internet purchases, saying it will level the playing field for traditional brick and mortar companies and provide needed revenue for state governments.

HOME MORTGAGE DEDUCTION

Markey - Has said home mortgage interest deduction should be off the table in congressional budget negotiations.

Gomez - Does not rule elimination of the home mortgage interest deduction as part of a comprehensive federal budget deal, though adds it would be at the bottom of his list of potential actions.

MEDICAL DEVICE TAX

Gomez - Supports immediate repeal of tax on medical device companies that was part of federal health care overhaul, saying it hurts key industry in Massachusetts.

Markey - Would also support repeal of medical device tax, but only if revenue from tax can be replaced, perhaps by elimination of subsidies for big oil.

BUFFETT RULE

Markey - Backs so-called Buffett rule, which would require those earning $1 million a year or more to pay at least 30 percent of their income in taxes.

Gomez - Opposes Buffett rule.

ABORTION

Gomez - Says he is personally opposed to abortion but would not vote to change current law or try to overturn Roe v. Wade, the 1973 Supreme Court decision that made abortion legal. He would not impose a litmus test requiring that a nominee to the Supreme Court support abortion rights.

Markey - Describes himself as a strong supporter of abortion rights and would defend Roe v. Wade. He said he would have a litmus test requiring that a nominee to the Supreme Court support abortion rights before he could vote for the person.

GAY MARRIAGE

Markey - Supports gay marriage and would require the federal government to recognize the validity of same-sex marriages. Also opposes the federal Defense of Marriage Act.

Gomez - Supports gay marriage, but says the decision to legalize same-sex marriages should be decided state by state. Opposes the federal Defense of Marriage Act.

Gomez - Says he supports "serious immigration reform," starting with securing our borders, deporting immigrants living in the United States illegally with criminal records, but also increasing legal immigration.

Markey - Says he supports "comprehensive immigration reform" that creates a path to citizenship for those already in the country and allows individuals brought here at a young age earn citizenship by serving in the military or pursuing higher education.

DRONES

Markey - Supports use of armed drones overseas in limited circumstances when national interests are at stake. Believes any use of domestic drones should be accompanied by strict rules against spying on Americans.

Gomez - Believes U.S. should have discretion to use drones to target terrorists overseas, including Americans who have changed sides. Would be "very hesitant" about the use of drones within the U.S.

NSA SURVEILLANCE

Gomez - Believes former intelligence contractor Edward Snowden, who claimed responsibility for revealing NSA surveillance programs, should be prosecuted. Also says there is a fine line between national security and personal privacy and that NSA may have gone too far absent an imminent threat to national security.

Markey - Believes Snowden should be prosecuted. Also says U.S. needs to be tough on terrorism, but that protections should be put in place to assure that innocent Americans do not have their privacy compromised.

SYRIA

Markey - Supports non-lethal assistance to Syrian opposition but opposes no-fly zone at this time and urges caution in arming rebel groups that could wind up being hostile to U.S. interests in the future.

Gomez - Believes U.S. should take a more aggressive role by establishing a no-fly zone and providing arms to trusted elements of the Syrian opposition against the Assad regime. Opposes any use of U.S. ground forces in Syria.

IRAN

Gomez - Supports stronger sanctions against Iran to prevent it from pursuing nuclear development. Considers military action against Iran to be the "last option," but says Iran must be aware there is a credible military threat.

Markey - Supports a comprehensive approach to preventing Iran from becoming a nuclear power, including sanctions that he believes are having a crippling effect on Iranian regime. Does not completely rule out military option.

GUANTANOMO BAY

Markey - Supports the closing of Guantanamo Bay as soon as possible, saying its presence has become a recruitment tool for enemies.

Gomez - Believes U.S. military detention center at Guantanamo Bay should remain open.

AFGHANISTAN

Gomez - Supports withdrawal of American troops from Afghanistan but believes it was a mistake to publicly announce timetable.

Markey - Supports withdrawal of troops and believes U.S. should meet agreed-upon timetable.

ISRAELI/PALESTINIAN PEACE TALKS

Gomez - Believes two-state solution remains viable in negotiations between Israel and the Palestinians, says U.S. should respect Israel's security needs and not try to "twist arms" in negotiations.

Markey - Considers two-state solution possible through negotiations. Believes that economic development must be part of the solution for the Palestinians.

DEFENSE SPENDING

Markey - Has called for cutting $100 billion on outdated Cold War era nuclear programs and focusing resources on 21st-century threats, including cybersecurity, through innovative technology.

Gomez - The former Navy SEAL favors increased funds for such things as training, equipment and health care treatment for veterans, but believes military can streamline civilian staff and certain weapons development programs.

KEYSTONE PIPELINE

Gomez - Supports proposed oil pipeline from Canada because he says it will create jobs and help promote oil independence.

Markey - Opposes Keystone, saying it bring the world's "dirtiest oil" into the U.S. and that much of it will end up being exported to other countries after reaching the end of the pipeline.

CLIMATE CHANGE

Markey - Says urgent action is needed to address global warming and would promote agenda in Senate that calls for reducing dependence on foreign oil and investment in clean energy technology.

Gomez - Calls himself "green Republican" who believes climate change is real and that humans are contributing to it. Supports energy agenda that promotes private-sector innovation and does not put U.S. at competitive disadvantage.

FISHERIES ASSISTANCE

Gomez - Has said it would be a top priority to improve the science related to measuring fishing stocks and loosen overly restrictive regulations on fishermen.

Markey - Opposes term limits, saying it should be left to voters to decide how long a member serves in Congress.

Gomez - Backs a two-term limit for newly elected members of the U.S. Senate and a three-term limit for newly elected members of the U.S. House. Has promised to serve no more than two full terms in Senate.