A commonly-prescribed antidepressant reduces anxiety first and has a smaller effect on depressive symptoms weeks later, a study suggests.
Researchers at University College London said it made people feel better but worked in unexpected ways.
Their trial involved 653 UK patients, half of whom were given sertraline and the other half a placebo (dummy pill).
Psychiatrists say the findings are reassuring for doctors and patients, confirming the benefits of treatment.
Antidepressants are one of the most commonly-prescribed medications in the UK and concerns have often been raised that too many are being given to patients.
Sertraline, a selective serotonin reuptake inhibitor (SSRI), is one of the most common drugs used to treat symptoms of depression and anxiety.
But scientists still have little idea of how these kind of drugs work.
In this study, published in The Lancet Psychiatry journal, patients with mild to severe depressive symptoms, or anxiety, or a mix of both, were selected from 179 GP surgeries in the UK and enrolled on the trial.
In all cases, GPs were not sure whether to prescribe an antidepressant.
After six weeks, the patients taking sertraline reported a 21% greater improvement in anxiety symptoms - such as feeling worried, nervous and irritable - compared to the control group taking a dummy pill. After 12 weeks, the gap was 23%.
But there was little evidence of the drug reducing depressive symptoms, such as poor concentration, low mood and lack of enjoyment after six weeks - and only marginal improvements (13%) after 12 weeks.
Nonetheless, the group taking antidepressants were twice as likely as the other trial participants to say their mental health felt better overall.
"It appears that people taking the drug are feeling less anxious, so they feel better overall, even if their depressive symptoms were less affected," said lead study author Dr Gemma Lewis, from UCL.
She said the findings suggest sertraline and similar antidepressants are being used correctly by GPs - and more patients with mild to moderate symptoms could benefit from them.
Prof Glyn Lewis, also part of the study, said he was surprised by the results of the trial.
"They [antidepressants] work, just in a different way than we had expected," he said.
"We definitely need better treatments for depression, and more research, but they are effective drugs."
The study found there was also little evidence of side-effects in the group taking sertraline.
Antidepressants such as sertraline work by increasing levels of serotonin in the brain.
Dr Sameer Jauhar, honorary consultant psychiatrist from King's College London, said the trial's positive findings probably reflected why GPs prescribe antidepressants.
But he said they were not relevant to people with major depression.
"It is not surprising that depressive symptoms did not improve to a great extent, given that only half the people had a diagnosis of depression."
'Not for everyone'
Prof Wendy Burn, president of the Royal College of Psychiatrists, said the findings would be "reassuring for both doctors and patients".
But she added: "It also shows that antidepressants are not the solution for everyone and reinforces the importance of combining them with other options, such as talking therapies and social prescribing."
Prof Helen Stokes-Lampard, chair of the Royal College of GPs, said antidepressants worked best "when taken for significant periods of time, which is one reason why doctors will often review patients after several weeks of use and then prescribe a fairly long course of the drugs, if they appear to be beneficial".
"This study gives an interesting insight into how a medication primarily used to treat depression may be improving a patients' health in other ways in the shorter term, by reducing symptoms of anxiety, which is often associated with depression."
Previous research found that all antidepressants were more effective at reducing symptoms of acute depression than dummy pills, but it was not based on patients' individual views of how they felt.
The trial is the largest placebo-controlled trial of an antidepressant which has not been funded by the pharmaceutical industry, the UCL researchers said.