Authorities in Venezuela have released a young musician who was jailed six weeks ago after taking to social media to vent her frustration against President Nicolas Maduro's Government.

Key points: Karen Palacios said her sacking from the National Philharmonic was politically motivated

Karen Palacios said her sacking from the National Philharmonic was politically motivated She was freed a full month after a judge ordered her immediate release

She was freed a full month after a judge ordered her immediate release The UN said Venezuela is using arbitrary detentions to stifle free expression

Karen Palacios, 25, blasted the Government in a Twitter thread that went viral after losing her job as top clarinetist in the National Philharmonic.

Her mother says a week later two strangers appeared at their home saying the musician was needed for an interview at the presidential palace.

Loading

Instead she was locked up at Venezuela's most notorious military prison and accused of violating Venezuela's hate law.

Rights groups condemned Ms Palacios' arrest as an example of the deteriorating human rights situation.

Her plight has drawn attention to what the United Nations in a report this month signalled as the Government's growing use of arbitrary detentions to intimidate opponents — real or imagined — and stifle free expression.

Venezuela's political crisis came to a head this year when the head of the opposition, Juan Guaido, declared himself president and launched a failed coup.

Ms Palacios wrote a string of tweets that went viral in late May.

"I was informed that my contract wasn't renewed because, 'I signed against the regime'," she wrote, in an apparent allusion to her support for a petition seeking to recall Mr Maduro.

"Now I ask myself, when they called to offer me a job, why didn't they say one of the requirements was to think the same as them?"

The National Institute of Feminine Orientation prison, where Ms Palacios was detained. ( AP: Ariana Cubillos )

Hours before Ms Palacios' release, her mother, Judith Perez, broke down into tears while watching a video of her daughter's clarinet performances.

In 2014, Ms Palacios was diagnosed with Asperger's syndrome and found in her obsessive study of classical music a natural antidote to frequent bouts of depression.

"I beg God to forgive me but when I hear her play I no longer feel happiness. I'm filled with sadness," Ms Pérez said, recalling the anguished look on her daughter's face in two brief visits with her in jail.

"I know she needs her clarinet. That's what hurts her."

But after 45 days in jail — and a full month after a judge ordered her immediate release — Ms Palacios was freed on Tuesday (local time).

"I'm free, I'm free," she said, embracing her mother and family members after her release.

Government supporters accused Ms Palacios of crossing a line and inciting violence when on May 1 — a day after Mr Maduro crushed a military rebellion called by opposition leader Juan Guaido — she sent messages to her few hundred Twitter followers expressing a desire "to read one sleepless night that Maduro fled the country, was killed, jailed or anything else that makes me happy".

Ms Palacios, in an interview with El Nacional newspaper before her arrest, said she regretted the comments made in the heat of the moment and removed them within a few hours of being posted.

Space to play or pause, M to mute, left and right arrows to seek, up and down arrows for volume. Watch Duration: 52 seconds 52 s Riots on the streets of Caracas

AP