Men become more charitable when in the presence of a woman they find pretty compared to one they find unattractive, say a group of psychologists.
However, women are not influenced by who they were with and showed little change in the amount of money they gave.
Professor Robin Dunbar, from the institute of cognitive and evolutionary anthropology at Oxford University who led the study, said that men appeared to use acts of generosity as a way of appealing to females they were attracted to.
"Buying presents to impress women has been a key part of mating rituals in humans for some time, but it appears that it is the act of generosity rather than the gift itself which is being used as a mating signal," the Telegraph quoted him, as saying.
"We have found in previous studies that women are attracted to generous men. They seem to like heroic types for short term relationships, but altruists for long term relationships.
"Generosity could be a way for men to show their suitability to invest in a relationship and help in rearing offspring," he added.
Researcher Wendy Iredale, form the department of psychology at the University of Kent, conducted the study with 45 male and 45 female volunteers who were asked to play a series of games that earned them up to 24 pounds in money.
The participants, who were not told the purpose of the study, were then asked if they would like to donate some of the earnings to charity.
On each occasion they were either left alone to donate, or observed either by a member of the opposite sex or the same sex as they made their donation. They were then asked to rate the attractiveness of the person in the room with them.
The scientists found that men donated between 50 per cent to 100 per cent of their earnings when a woman was in the room and were more generous when they were being watched by a woman they thought was attractive.
When they were with a man or unaccompanied they donated less than 40 per cent. The female volunteers donated an average of around 40 per cent regardless of who was in the room with them.