France ordered prosecutors around the country to crack down on hate speech, anti-Semitism and those glorifying terrorism and announced Wednesday it was sending an aircraft carrier to the Middle East to work more closely with the U.S.-led coalition fighting ISIS militants.

Authorities said 54 people had been arrested for hate speech and defending terrorism since terror attacks killed 20 people in Paris last week.

Meanwhile, Yemen's al-Qaeda branch confirmed it carried out last week's deadly assault to avenge cartoons depicting the Prophet Muhammad, as it called for unity among jihadist ranks and vowed more attacks on the West.

President Francois Hollande, speaking aboard the Charles de Gaulle aircraft carrier to members of the military, said the situation "justifies the presence of our aircraft carrier."

One of the Paris gunmen had claimed allegiance to ISIS, while two others said they were backed by Yemen's al-Qaeda branch. France is already carrying out airstrikes against the ISIS in Iraq.

The order to prosecutors came as Charlie Hebdo's defiant new issue sold out before dawn around the French capital, with scuffles at kiosks over dwindling copies of the satirical newspaper fronting Muhammad.

Push to expand surveillance laws

France has been tightening security and searching for accomplices since the terror attacks began, but none of the 54 people mentioned Wednesday have been linked to the attacks. That's raising questions about whether Hollande's Socialist government is impinging on the very freedom of speech that it so vigorously defends when it comes to Charlie Hebdo.

Among those detained was Dieudonne, a popular yet controversial comic who has repeated convictions for racism and anti-Semitism.

Nasr-al-ansi-screen-grab

Al-Qaeda in the Arabian Peninsula on Wednesday claimed responsibility for the Charlie Hebdo attack in Paris last week. Nasr al-Ansi, a top commander with the group, made the claim in a video on its Twitter account. (Twitter/al-Malahem media)

In a message distributed to all French prosecutors and judges, the Justice Ministry laid out the legal basis for rounding up those who defend the Paris terror attacks as well as those responsible for racist or anti-Semitic words or acts. The order did not mention Islam.

The Justice Ministry said the 54 people included four minors and several had already been convicted under special measures for immediate sentencing. Inciting terrorism can bring a five-year prison term — or up to seven years for inciting terrorism online.

Hollande aircraft carrier France Paris shooting

French President Francois Hollande looks out from a window of a helicopter as he departs the French nuclear aircraft carrier Charles de Gaulle. (Anne-Christine Poujoulat/Reuters)

In its message to prosecutors and judges, the ministry said it was issuing the order to protect freedom of expression from comments that could incite violence or hatred. It said no one should be allowed to use their religion to justify hate speech.

The government is writing broader new laws on phone-tapping and other intelligence to fight terrorism, spokesman Stephane Le Foll said. It also is launching a deeper project to rethink France's education system, urban policies and integration model, in an apparent recognition that last week's attacks exposed deeper problems about inequality in France, especially at its housing projects.

'Revenge for the Prophet'

In an 11-minute video posted on the group's Twitter account, Nasr al-Ansi, a high ranking commander of al-Qaeda in the Arabian Peninsula (AQAP), said the attack on the office of the Charlie Hebdo was in "revenge for the prophet."

He warned of more "tragedies and terror" in the future, saying "you will look for peace and stability but you will not find it because of the deeds of those carrying out martyrdom operations and heroes of lone jihad."

France Attacks Paris grand mosque

Police officers check a woman's identity card outside the Grand Mosque of Paris, Wednesday, one week after a terror attack on the French satirical newspaper Charlie Hebdo. (Jacque Brinon/Associated Press)

​Al-Ansi said AQAP "chose the target, laid out the plan and financed the operation." He also said the radical Yemeni-American cleric Anwar al-Awlaki, who was killed in a U.S. drone strike in Yemen in September 2011, had played a role in arranging the attack.

Al-Ansi made no claim to the subsequent attack and standoff at a kosher supermarket, but praised the gunmen Amedy Coulibaby. 

If confirmed, that would mean the Paris attack was years in the making. But Al-Ansi produced no evidence to support his claims, leaving lingering questions over the exact relationship between the attackers and the militant group's leadership in Yemen.

U.S. intelligence officials say they have no evidence AQAP coordinated the attack or knew about it in advance. The officials spoke on condition of anonymity because they weren't authorized to discuss classified matters publicly.

Charlie Hebdo returns

Working out of borrowed offices, Charlie Hebdo employees who survived the attack put out the issue that appeared Wednesday with a print run of 3 million — more than 50 times the paper's usual circulation. After the weekly sold out, kiosk operators told people to return Thursday for a second run.

France shooting charlie hebdo sold out

A handwritten sign, which reads "No more Charlie," is displayed at a retail outlet in Paris after it sold out the limited stock of Charlie Hebdo. (John Schults/Reuters)

"Distributing Charlie Hebdo, it warms my heart because we say to ourselves that he is still here, he's never left," said Jean-Baptiste Saidi, a van driver delivering copies well before dawn on Wednesday.

French Interior Minister Bernard Cazeneuve was among those to get a copy before they sold out. 

"I rediscovered their liberty of tone," he told France-Inter radio, describing the issue as one of "tender impertinence."

French Prime Minister Manuel Valls prominently displayed a copy of the satirical paper as he left a Cabinet meeting Wednesday but his hand carefully covered Muhammad's face.