Image caption There will be a new criminal office for people who wield knives in a public place or school

A raft of new criminal offences have come into force in England and Wales, as well as tougher prison sentences for violent crimes.

There is a new offence of aggravated possession of a knife, and mandatory life sentences for anyone committing a second serious violent or sexual crime.

Some dangerous prisoners will have to serve two-thirds or whole sentences, instead of parole after half the term.

Ministers said they were determined to crack down on violent criminals.

The offence of aggravated knife possession targets those who wield knives in a public place or school to threaten and create a risk of serious physical harm.

In almost all such cases, judges must impose a custodial sentence - a minimum six months for an adult or a four-month detention and training order for 16 and 17 year olds.

There is also the "two strikes" system - a new mandatory life sentence for people convicted of a second very serious sexual or violent offence.

Media playback is unsupported on your device Media caption Justice Secretary Chris Grayling: "When somebody behaves in an aggressive way with a knife, they should and will go to jail".

For those dangerous criminals who do not come under the two strikes rule, the government is introducing an extended determinate sentence (EDS).

Unlike normal sentences, offenders on EDS are not automatically released from prison halfway through their jail term.

They have to serve at least two-thirds of their sentence and may be detained until the end of it.

EDS replaces the controversial "indeterminate" sentences under which prisoners deemed a danger to the public could be detained indefinitely.

The measures have been introduced as part of the Legal Aid, Sentencing and Punishment of Offenders Act 2012.

Analysis The combination of the "two strikes" rule and Extended Determinate Sentences marks the end of the highly controversial Indeterminate Sentence For Public Protection, or IPP. These sentences were introduced under the 2003 Criminal Justice Act to solve a vexing problem: how do you deal with an offender who has served their sentence, but remains a real danger to the public when released? IPP was intended to be the answer, to be used for a small number of dangerous, violent and sex offenders. However, IPPs were used very widely and became de facto life sentences, in many cases for criminals serving relatively short tariffs - in some cases months rather than years. To be released the offender had to show that he or she no longer posed a danger to the public. That required the provision of rehabilitative courses, and there simply weren't enough of these. The government hopes the new system will be clearer, while still protecting the public from truly dangerous offenders.

The provisions in the Act are being introduced in stages. A new criminal offence of squatting came into effect in September 2012 and the remaining measures will come into effect in 2013.

Some of the changes have attracted criticism.

With regards to knife crime, Michael Turner QC, chairman of the criminal bar association, said "a very blunt instrument" was being used in the form of deterrent sentences which, he said, "research shows doesn't work".

"No-one in that moment of pulling a knife thinks about the deterrent and a lot don't even know about it," he said.

And Kate Whaley, from the charity Mothers against Murder and Aggression (MAMAA), said the measures failed to factor in rehabilitation.

She told BBC Radio 4's Today programme: "What we need to be doing is finding ways to stop young people carrying weapons in the first instance.

"What is going to be done to change the offending behaviour of these people? That is what we should be looking at."

Speaking about the changes, Justice Secretary Chris Grayling told the BBC the changes would mean "a small number of additional prisoners going to prison for longer", adding that he was "all in favour of that".

'Second chance'

He said the two-strikes rule would apply to serious sexual offences or violent offences that would command a sentence of 10 years or more.

"Everyone deserves a second chance. If they don't use that second chance they go to prison for life," he said.

"If you're wandering round carrying knife in a threatening way, you will go to jail. I'm also looking at the issue of cautions for knife crime, which I'm not happy with at all."

Mr Grayling, who became justice secretary in September's cabinet reshuffle, said he would make "more changes" as he continued to review sentences.

BBC legal affairs correspondent Clive Coleman says that while some people see the new measures as reducing a judge's discretion, others will welcome what is considered to be a tough new regime.

In Scotland, Justice Secretary Kenny MacAskill said last week that the maximum prison sentence for carrying a knife in Scotland would increase from four to five years.

Mr MacAskill also announced a crackdown on people released from prison who commit more crime before their original sentence has ended.