About 1,200 people were killed, while the Israeli military says more than 200 soldiers and civilians, including women and children, were taken to Gaza as hostages.
More than 14,000 Palestinians in Gaza have been killed in air and artillery strikes carried out by the Israeli military in response, according to the Hamas-run health ministry in Gaza.
Britain took control of the area known as Palestine following the defeat of the Ottoman Empire, which ruled that part of the Middle East, in World War One.
The land was inhabited by a Jewish minority and Arab majority, as well as other, smaller ethnic groups.
Tensions between the two peoples grew when the international community gave the UK the task of establishing a "national home" in Palestine for Jewish people.
This stemmed from the Balfour Declaration of 1917, a pledge made by then Foreign Secretary Arthur Balfour to Britain's Jewish community.
The declaration was enshrined in the British mandate over Palestine and endorsed by the newly-created League of Nations - forerunner of the United Nations - in 1922.
To Jews Palestine was their ancestral home, but Palestinian Arabs also claimed the land and opposed the move.
Between the 1920s and 1940s, the number of Jews arriving there grew, with many fleeing from persecution in Europe, especially the Nazi Holocaust in World War Two.
Violence between Jews and Arabs, and against British rule, also increased.
In 1947, the UN voted for Palestine to be split into separate Jewish and Arab states, with Jerusalem becoming an international city.
That plan was accepted by Jewish leaders but rejected by the Arab side and never implemented.
In 1948, unable to solve the problem, Britain withdrew and Jewish leaders declared the creation of the State of Israel.
It was intended to be a safe haven for Jews fleeing persecution, as well as a national homeland for Jews.
Fighting between Jewish and Arab militias had been intensifying for months, and the day after Israel declared statehood, five Arab countries attacked.
Hundreds of thousands of Palestinians fled or were forced out of their homes in what they call Al Nakba, orthe "Catastrophe"
By the time the fighting ended in a ceasefire the following year, Israel controlled most of the territory.
Jordan occupied land which became known as the West Bank, and Egypt occupied Gaza.
Jerusalem was divided between Israeli forces in the West, and Jordanian forces in the East.
Because there was never a peace agreement there were more wars and fighting in the following decades.
In a war in 1967, Israel occupied East Jerusalem and the West Bank, as well as most of the Syrian Golan Heights, Gaza and the Egyptian Sinai peninsula.
Most Palestinian refugees and their descendants live in Gaza and the West Bank, as well as in neighbouring Jordan, Syria and Lebanon.
Neither they nor their descendants have been allowed by Israel to return to their homes - Israel says this would overwhelm the country and threaten its existence as a Jewish state.
Israel still occupies the West Bank and claims the whole of Jerusalem as its capital, while the Palestinians claim East Jerusalem as the capital of a hoped-for future Palestinian state. The US is one of only a handful of countries to recognise the city as Israel's capital.
In the past 50 years Israel has built settlements in the West Bank and East Jerusalem, where more than 700,000 Jews now live.
Settlements are held to be illegal under international law - that is the position of the UN Security Council and the UK government, among others - although Israel rejects this.
Gaza is a narrow strip of land sandwiched between Israel and the Mediterranean Sea, but with a short southern border with Egypt.
Just 41km (25 miles) long and 10km wide, it has more than two million inhabitants and is one of the most densely populated places on Earth.
In the wake of the 1948-49 war, Gaza was occupied by Egypt for 19 years.
Israel occupied Gaza in the 1967 war and stayed until 2005, during that time building Jewish settlements.
Israel withdrew its troops and settlers in 2005, though it retained control over its airspace, shared border and shoreline. The UN still considers the territory to be occupied by Israel.
There are a number of issues which the two sides cannot agree on.
These include:
Israel-Palestinian peace talks were held on and off between the 1990s and 2010s, interspersed with outbreaks of violence.
A negotiated peace did seem possible in the early days. A series of secret talks in Norway became the Oslo peace process, forever symbolised by a ceremony on the White House lawn in 1993 presided over by President Bill Clinton.
In a historic moment, the Palestinians recognised the State of Israel and Israel recognised its historical enemy, the Palestine Liberation Organisation (PLO), as the sole representative of the Palestinian people. A self-governing Palestinian Authority was set up.
Cracks soon appeared, though, with then opposition leader Benjamin Netanyahu calling Oslo a mortal threat to Israel. The Israelis accelerated their project to settle Jews in the occupied Palestinian territories. The recently emerged Palestinian militant group Hamas sent suicide bombers to kill people in Israel and wreck the chances of a deal.
The atmosphere in Israel turned ugly, culminating in Israeli Prime Minister Yitzhak Rabin's assassination by a Jewish extremist on 4 November 1995.
In the 2000s attempts were made to revive the peace process - including in 2003 when a roadmap was devised by world powers with the ultimate goal of a two-state solution, but this was never implemented.
Peace efforts finally stalled in 2014, when talks failed between the Israelis and Palestinians in Washington.
The mostrecent peace plan - prepared by the USwhen Donald Trump was president - was called "the deal of the century" by Prime Minister Netanyahu, but was dismissed by the Palestinians as one-sided and never got off the ground.
Gaza is ruled by Hamas, an Islamist group which is committed to the destruction of Israel and is designated as a terrorist group by the UK and many other countries.
Hamas won the Palestinians' last elections in 2006, and seized control of Gaza the following year by ousting the rival Fatah movement of West Bank-based President Mahmoud Abbas.
Since then, militants in Gaza have fought several wars with Israel, which along with Egypt has maintained a partial blockade on the strip to isolate Hamas and try to stop attacks, particularly the indiscriminate firing of rockets towards Israeli cities.
Palestinians in Gaza say Israel's restrictions and its air strikes on heavily populated areas amount to collective punishment.
This year has been the deadliest year on record for Palestinians in the occupied West Bank and East Jerusalem. They also complain of the restrictions and military actions being carried out there in response to deadly attacks on Israelis.
These tensions could have been one of the reasons for Hamas's latest attack.
But the militants may also have been seeking to boost their popularity among ordinary Palestinians, including by using hostages to pressure Israel to free some of the estimated 4,500 Palestinians held in its prisons.
The US, the European Union and other Western countries have all condemned the Hamas attack on Israel.
The US, Israel's closest ally, has over the years given the Jewish state more than $260bn in military and economic aid, and has promised additional equipment, air defence missiles, guided bombs and ammunition.
It has also sent two aircraft carrier strike groups to the eastern Mediterranean to deter Israel's enemies, particularly Lebanon's Hezbollah movement, from opening a second front in the war.
Russia and China have both refused to condemn Hamas, and say they are maintaining contact with both sides in the conflict. Russian President Vladimir Putin has blamed US policy for the absence of peace in the Middle East.
Iran, Israel's arch-enemy, is a key supporter of Hamas, as well as Hezbollah, whose militants have been exchanging fire with Israeli forces almost daily since Hamas's attack.
Questions have been asked about Iran's role in the Hamas' attack, after reports said it gave the go-ahead days before. Tehran has, however,denied any involvement.
The Palestinian militant group Hamas launched an unprecedented assault on Israel on 7 October, with hundreds of gunmen infiltrating communities near the Gaza Strip.