Ahed Tamimi hugged by her father Bassem at the West Bank, July 29. Ahed Tamimi hugged by her father Bassem at the West Bank, July 29. (AP photo)

NABI SALEH, West Bank (AP) — Palestinian teen Ahed Tamimi, who became an international symbol of resistance to Israeli occupation after slapping two soldiers, walked out of an Israeli prison Sunday and told throngs of journalists and well-wishers that she now wants to study law to defend her people.

The curly haired 17-year-old said that "resistance continues until the occupation is removed," but refrained from saying she would slap soldiers again. The teen, who is on probation, said her eight months in prison were tough and helped her appreciate life.

At an outdoor news conference near her family home, she spoke against the backdrop of a large model of a slingshot that was "loaded" with a pencil rather than a stone, apparently to highlight education as one of the possible Palestinian tactics.

Underlying her case are clashing narratives about Israel's half-century rule over the Palestinians, the extent of permissible Palestinian resistance to it and the battle for global public opinion.

Tamimi's supporters see a brave girl who struck two armed soldiers in frustration after having just learned that Israeli troops seriously wounded a 15-year-old cousin, shooting him in the head from close range with a rubber bullet during nearby stone-throwing clashes.

In Israel, she is seen by many either as a provocateur, an irritation or a threat to the military's deterrence policy — even as a "terrorist." Israel has treated her actions as a criminal offense, indicting her on charges of assault and incitement. In liberal circles, the hard-charging prosecution of Tamimi was criticized as a public relations disaster because it turned her into an international icon.

Her release comes at a time when Palestinian hopes for an independent state appear dimmer than ever.

Israeli-Palestinian talks on setting up a state in lands captured by Israel in 1967 — the West Bank, the Gaza Strip and east Jerusalem — have been deadlocked since hard-line Israeli Prime Minister Benjamin Netanyahu came to power in 2009. Palestinian President Mahmoud Abbas suspended contacts with the U.S. after President Donald Trump recognized Jerusalem as Israel's capital in December in what Palestinians denounced as a display of blatant pro-Israel bias. Abbas, meanwhile, has stepped up financial pressure on Gaza, controlled since 2007 by his bitter domestic rival, the Islamic militant Hamas.

Many Palestinians are disillusioned by their leaders in both political camps and feel exhausted after years of conflict with Israel. Alternatives have arisen, including calling for a single state for both peoples between the Jordan River and the Mediterranean, but haven't gained a mass following.

In this context, the idea of so-called popular resistance — regular demonstrations, including stone-throwing by unarmed protesters — has only caught on in a few West Bank villages, including Nabi Saleh, home to the extended Tamimi clan.

Since 2009, residents of Nabi Salah have staged regular anti-occupation protests that often ended with stone-throwing clashes. Ahed has participated in such marches from a young age and has had several highly publicized run-ins with soldiers. One photo shows the then 12-year-old raising a clenched fist toward a soldier towering over her.

In a sign of her popularity, a pair of Italian artists painted a large mural of her on Israel's West Bank separation barrier ahead of her release.

Israeli police said they were caught in the act along with another Palestinian and arrested for vandalism. On Sunday, Israel canceled the visas of the two Italians and ordered them to leave the country within three days, police said.

Ahed and her mother Nariman — also arrested in December in connection with the same incident — were released Sunday morning from a prison in northern Israel. They were driven by bus to the West Bank and were given a hero's welcome in Nabi Saleh.

"The resistance continues until the occupation is removed," Ahed said upon her return. "All the female prisoners are steadfast. I salute everyone who supported me and my case."

From her home, Ahed headed to a visit to the grave of Palestinian leader Yasser Arafat. She laid a wreath, kissed the headstone — twice at the request of photographers — and recited a prayer from the Quran, the Muslim holy book.

She was then taken with her family to a meeting with Abbas at his headquarters in Ramallah.

The 83-year-old Abbas praised her as a symbol of resistance to occupation — even as he faces growing domestic criticism for not walking away from continued security coordination between his forces and Israeli troops against Hamas, a shared foe.

In an afternoon news conference, Ahed said that she completed her high school exams in prison, with the help of other prisoners. Palestinian inmates typically organize study courses to complete high school and even university degrees.

"I will study law to defend my people and defend my Palestinian cause in international forums," she said.

She said her prison experience was tough, and that she missed her old life in the village and her friends. She said she underwent three lengthy interrogations without a female officer present, in violation of Israel's own rules.

At one point Sunday, Ahed received a call from Turkish President Recep Tayyip Erdogan, who congratulated her on her release, said her father.

Tamimi's scuffle with the two soldiers took place Dec. 15 in Nabi Saleh.

At the time, protests had erupted in several parts of the West Bank over Trump's recognition 10 days earlier of the contested city of Jerusalem as Israel's capital. She was arrested at her home four days later, in the middle of the night.

Ahed was 16 when she was arrested and turned 17 while in custody. Her case has trained a spotlight on the detention of Palestinian minors by Israel, a practice that has been criticized by international rights groups. Some 300 minors are currently being held, according to Palestinian figures.

Israeli Cabinet minister Uri Ariel said the Tamimi case highlighted what could happen if Israel lets its guard down.

"I think Israel acts too mercifully with these types of terrorists. Israel should treat harshly those who hit its soldiers," he told The Associated Press. "We can't have a situation where there is no deterrence. Lack of deterrence leads to the reality we see now ... we must change that."