In a world where machines can do many things as well as humans, one would like to hope there remain enclaves of human endeavour to which they simply cannot aspire.

Art, literature, poetry, music - surely a mere computer without world experience, moods, memories and downright human fallibility cannot create these.
Meet Aaron, a computer program that has been painting since the 1970s - big dramatic, colourful pieces that would not look out of place in a gallery.
The "paintings" Aaron does are realised mainly via a computer program and created on a screen although, when his work began being exhibited, a painting machine was constructed to support the program with real brushes and paint.
Aaron does not work alone of course. His painting companion is Harold Cohen, who has "spent half my life trying to get a computer program to do what only rather talented human beings can do".
A painter himself, he became interested in programming in the late 1960s at the same time as he was pondering his own art and asking whether it was possible to devise a set of rules and then "almost without thinking" make the painting by following the rules.
The programming behind Aaron  - written in LISP, which was invented by one of the founding fathers of artificial intelligence, John McCarthy, back in the 1960s - attempts to do just that.
Some of Aaron's knowledge is about the position of body parts and how they fit together, while some of the other rules are decided by the machine.
It actually "knows" very little about the world - it recognises the shape of people, potted plants, trees and simple objects such as boxes and tables. Instead of teaching it ever more things, Mr Cohen has concentrated on making it "draw better".
And it has been a great pupil.
"The machine had become a world-class colourist - it was much more adventurous in terms of colour than I was," he told the BBC.
For many years the two worked side by side, but gradually Mr Cohen began having doubts about the partnership.
First, he decided to abandon the painting machine that was hooked up to Aaron.
It had been, he told the BBC, too cumbersome and had led too many commentators to regard the project as a robot rather than clever programming, which had irked him.
But he was also having bigger doubts - Aaron was both becoming too independent and also revealing some serious limitations.
"I dreamed up a very simple algorithm and it obviously embodied a great deal of knowledge, but when I looked at the output I didn't remember doing it because I hadn't done it," he told the BBC.
"It no longer needed me. I never intended to leave everything to the program, but it gradually came to me that it could do without me.
"It had become autonomous enough to disturb the guy who wrote the program."
What had originally been conceived as a team project was becoming something else entirely.
"Works of art are like children - they go out into the world but you always have a connection to them and I'd lost that connection. I felt out in the cold," he told the BBC.
At the same time though it was clear that Aaron, while excelling at colouring, was never going to be truly creative.
"It was not that autonomous, and the very little dose of autonomy that Aaron had only related to colour," Mr Cohen said.
It led him to question whether a creative AI was ever possible.
"I don't deny the possibility that, at some point in the future, a machine can make something approaching art - but it is going to be a lot more complex than teaching a car to drive around a city without a driver, and it isn't going to happen next Wednesday or even in what is left of this century," he told the BBC.
The partnership with Aaron is still "alive and well", but it has changed.
Now, Aaron concentrates on the drawing, while Mr Cohen does the painting. And these days, he does it digitally, using a giant touchscreen rather than real paint - perhaps in a nod to the machine he created.
All of the greatest painters work by viewing the world around them and combining what they see with other cultural references and their own unique style.
Computers may seem to be at a huge disadvantage because they cannot take a stroll in the woods, watch the Sun set or view the cityscape at dusk, but actually computers are learning to see the world.
Artificial brains - known as neural networks - combined with huge datasets of information are offering computers new vision and could also be inspiring them to find their own style.
In Google's AI labs, they are busy building such networks in order to offer new services, better search and to label images on the web more efficiently.
But an interesting side-experiment undertaken by a couple of its engineers this summer saw them attempt to "see" inside the computer brain to work out how it was learning about images.
In doing so, the engineers discovered that such networks could actually create their own painting, based just on random-noise pictures, similar to the white noise on old TV sets.
The results were surprising - nightmarish, hallucinatory visions. Some compared them to the art a human might create when they had taken mind-altering drugs such as LSD, others to the work of tortured genius Vincent van Gogh.
The reason the computers created art that hints at madness or hallucinations could be because Google has mimicked the human visual brain, thinks Ben Harvey, a researcher in the department of psychology at the University of Coimbra in Portugal.
"The class of hallucinogens that contains magic mushrooms, LSD, mescaline and DMT alters perception," he writes in an article for web magazine The Psych Report.
"They impose patterns from things we have seen before on to our visual input, making us see faces in the clouds or intricate Oriental rug patterns on fields of grass."
Schizophrenia, which some believe Van Gogh had, works in a similar way.
"This may help us understand why some of Google's output reminds us of the distortions of reality seen in Van Gogh's brushwork," he adds.
For Google, the experiment offered a tantalising glimpse into an artificial brain - but was it also the first evidence of machine creativity?
Sort of, thinks Prof Mark Riedl, from the Georgia Institute of Technology, in the US.
In attempting to decipher the white noise, what Google's network was really doing was "trying to make a picture that it is more comfortable with", he told the BBC.
"So it is doing something creative, but it lacks direction and doesn't know that it is creating."
Creativity has long been regarded as an essential part of intelligence, and for some it is time that it was applied to evaluate machine learning.
Late last year, Prof Riedl proposed a new type of test to see whether artificial intelligence was on a par with that of humans.
Rather than require a machine to have a human-like conversation, as proposed by the Turing Test, his LoveLace 2.0 test would ask a machine to create a convincing poem, story or painting.
"There is no theoretical reason why computers can't do creative tasks, but there is as yet no general model of creativity to test it," he said.
And he is not talking about the genius of Picasso, Mozart or Shakespeare - he is more interested in the general run-of-the-mill creativity that all humans have.
"We can doodle, tell stories, put together a poem. Can we also build systems that we can ask to paint us a picture?" he asks.
One of the biggest problems with such a goal is lack of data.
"The real world is the greatest dataset. Humans live in a rich, complicated world, and we come across lots of things. We see trees, landscapes, we talk, we communicate, we make jokes, but a computer doesn't know anything until we give it data."
And even machines that have been given the back catalogue of dead composers or thousands of pictures of famous paintings tend to have a narrow vision of their own creations.
"Human creators are capable of changing goals or values during the creative experience - they see the opportunity to do something differently but computers tend to be rather single-minded," he said.
Ultimately if you want a computer to be really creative, it will need a physical form, he thinks.
"If you did have embodiment, computers could start experiencing the world as we do, although it may experience the world differently and therefore will create differently."


Russell Slade says Cardiff City are "still in the fight" for the Championship play-offs and has urged fans to "stay with us".

Tuesday's 2-1 defeat by Brentford left them six points shy of sixth-placed Sheffield Wednesday.
Ipswich also have a mathematical chance of making the play-offs with three league games remaining.
"We're still in the fight and there could be another twist in the tail," said Slade.
"Stay with us, we'll keep fighting and the one thing you never do is give up."
The Bluebirds host already-relegated Bolton Wanderers on Saturday while Sheffield Wednesday are at Derby County in the lunchtime kick-off.
If Wednesday win and Cardiff lose or draw, Slade's men's hopes are over.
However, if Cardiff win and Wednesday lose, the play-off rivals' encounter on Saturday, 30 April will go a long way to deciding who has the chance to challenge for promotion.
Wednesday also have a vastly superior goal difference to Cardiff.
"Realistically it's a small chance, but whilst it's a chance we shall keep plugging away," said Slade.
Ipswich are two points behind Cardiff and would need both their rivals to slip up as the season draws to a close.
Kenneth Zahore came off the bench to provide Cardiff's late consolation at Brentford, after Scott Hogan had scored two late goals for the home side.
But Slade defended only sending on Zahore six minutes before the end of normal time and after Hogan had scored his second for the hosts.
"I don't think you can start looking at things like that and saying I should have done this, should we have done this?" said Slade.
"It's alright looking back. That group had played very well in the first period.
"Kenneth's come on previously and it's not quite happened for him and he's missed opportunities.
"I'm delighted for him. He's come on, he's scored an opportunity and we're pleased for him and that might give him a little bit of confidence and momentum going forward so it's a positive.
"However, we still find ourselves six points behind Sheffield."
Former Cardiff defender, now pundit Danny Gabbidon also retains hopes they can squeeze into the play-offs.
"It's going to be a fascinating couple of weeks and that's why I feel it's not over - these next two games, there's still a possibility," said Gabbidon.


Radio enthusiasts have recreated the first ever trans-Atlantic shortwave broadcast - 95 years after it connected Ardrossan and the United States.

Members of the Radio Society of Great Britain took part at the North Ayrshire coastal town on Sunday.
They exchanged broadcasts with the American Radio Relay League (ARRL) and the Radio Club of America in Connecticut.
The groups said the first transmission helped pioneer global communications.
They used modern and historical equipment to recreate the broadcasts.
Len Paget from the Radio Society of Great Britain (call sign: GM0ONX) said: "The frequencies used for the transmission were thought at the time to be useless for long distance communications and were given to radio experimenters as they were thought to have little or no commercial value.
"The success of these experiments showed that trans-Atlantic transmissions could be achieved using short wave frequencies with a power equivalent to that used by your toaster in kitchen. "
He says the successful test back in 1921 proved that world-wide communication could be achieved using short wave.
"The BBC World Service which was to follow in 1932 would heavily rely on the radio frequencies pioneered by radio amateurs of that time," he explained.
The radio amateurs involved in recreating the pioneering broadcast believe technology we rely on today is a direct descendant of the groundbreaking work of the "garage tinkerers" of almost a century ago.
Tom Gallagher of the ARRL (call sign: NY2RF) said anyone who owns a smartphone holds "the most powerful communications device yet created".
"It has three separate transmitters and receivers - cellular, bluetooth and wifi. All of that is wireless technology.
"We are standing on the shoulders of giants who worked with their own resources and ingenuity."
Jason O'Neill (call sign: GM7VSB) points to three examples where amateur radio operators have provided essential communications:


Tony Clubb scored a try on his return from having a kidney removed to help Wigan end an eight-match winless Super League run with victory over Widnes.

Clubb came off the bench in the 23rd minute for his first appearance since undergoing surgery 58 days ago.
His try came in between Sean O'Loughlin and Lewis Tierney scores for Wigan, while Lloyd White responded for Widnes to make it 16-6 at the break.
White pulled another try back before two Joe Burgess tries sealed victory.
Defeat ended Widnes' slim hopes of avoiding a bottom-four finish and having to fight for their top-flight status via the qualifiers.
Wigan's win takes them seventh in the table, above Huddersfield who were beaten 36-20 by Salford Red Devils in Sunday's other Super League match.
Clubb's comeback for the Warriors was not the only milestone moment for Shaun Wane's side as England full-back Sam Tomkins started a home match for the first time in 2017, having spent nine months out with a broken foot.
Tomkins played a crucial part in two tries, with a fine-cut out pass sending Burgess over for the first of two decisive late tries.
Winger Burgess' double came after he made a crucial tackle to deny Stefan Marsh a try and Widnes an equaliser with 19 minutes remaining of a pulsating match at the DW Stadium.
Wigan Warriors coach Shaun Wane:
"I'm happy with the win but I'm frustrated with some of the errors.
"If we keep hold of the ball and stop the unforced errors we could have won by a bigger margin. That's what we need to do, we need to be a bit more ruthless and we weren't that today.
"Our defence was much improved, they got two tries from poor defensive errors, but apart from that we defended really well. We have made massive improvements, but we can't mask over it."
Widnes Vikings coach Denis Betts:
"We played all right. At 16-12 with 10 minutes to go it's a pretty tight game.
"We have come back into it. If you look at the first two tries, Clubb's isn't a try and O'Loughlin's is a bit of magic and Danny Craven is out of position because he's only played two games at full-back.
"We defended our goal-line well, we've got to complete a bit better and be smarter with the ball, but other than that we didn't look out of our depth.
"I thought we had a chance to win that game but we didn't have enough composure or cutting edge to be able to do that."
Wigan Warriors: S Tomkins; Tierney, Gelling, Gildart, Burgess; Williams, Leuluai; Nuuausala, McIlorum, Sutton, Bateman, Farrell, O'Loughlin.
Replacements: Clubb, Powell, Wells, Isa.
Widnes Vikings: Craven; Marsh, Bridge, Runciman, Thompson; Mellor, Gilmore; Dudson, White, Buchanan, Whitley, Houston, Cahill.
Replacements: O'Carroll, Gerrard, Olbison, Heremaia.
Referee: Scott Mikalauskas.


The chair of the panel set up to advise the NHS and ministers on the governance of patient information has told the BBC the Care.data programme was mishandled.

Under the scheme, GP records in England will be put on a database and combined with other data to improve care.
Dame Fiona Caldicott, chairwoman of the Independent Information Governance Oversight Panel (IIGOP), told the BBC that "there was too much hurry".
She said the public information campaigns were not clear enough.
She also said NHS England had not followed the IIGOP's advice on making the text clearer on the leaflet designed to inform every household of the programme.
A BBC survey found that fewer than a third of those polled could recall getting the leaflet.
Dame Fiona also could not recall receiving a leaflet.
If her panel's advice to improve the text of the leaflet had been followed, "perhaps things would not have unfolded in quite the way that they did", she said in an interview with Radio 4's PM programme.
Following criticism of the Care.data information campaign from professional bodies such as the BMA and the Royal College of General Practitioners, the uploading of data from GP practices was delayed by six months to the autumn.
"It may not be long enough," said Dame Fiona. Although she felt the six-month delay had been useful, she said testing of the scheme with some practices and patients might reveal a longer pause was required.
In a statement, NHS England said: "We've been listening and acting on the views of patients, the public, doctors and others, and are making key changes in response."
It also pointed to moves in parliament to strengthen legal safeguards of patient data.
Following the row about Care.data, other concerns emerged about the use of existing pools of NHS data, particularly hospital episode statistics, by private firms.
Critics worry about so-called "commercial reuse licenses".
Such licences were an area that Dame Fiona said she was "not comfortable with" and urged greater transparency.
Dame Fiona's intervention is significant.
She is the author of two reports that have looked at how the NHS may best use patient information and share data while retaining the trust of patients.
Within each NHS organisation the staff member responsible for protecting the confidentiality of patient information is called a Caldicott Guardian.
The 11-member IIGOP panel she chairs even includes representatives from the Health and Social Care Information Centre, the body responsible for storing and providing access to NHS data.
The panel exists to provide "independent advice and challenge to the whole health and care system" on information governance issues, and to deliver annual updates to the Secretary of State for Health.
But Dame Fiona says in her personal view it needs increased powers and its recommendations should carry the weight of law.
"We don't have the resources, and I think learning from what has happened with these recent difficulties, there's evidence that such a panel needs to be on a statutory basis," she said.
Dame Fiona remains convinced that collecting and making use of health data through programmes like Care.data will yield great benefits.
But she also feels the NHS has moved too quickly, and has not always taken patients with it in the drive to make use of data.
"I can understand how it happens but in general terms there has been too much haste," she said.


Italy's President Giorgio Napolitano has chided the politicians who re-elected him, saying he only agreed to it because of a deep political crisis.

He accused them of an "unforgivable" failure to enact reforms.
Mr Napolitano, 87, was speaking as he became the first Italian president to be sworn in for a second term, after parties failed to find a replacement.
Italy still has no government, eight weeks after an exceptionally tight election resulted in a hung parliament.
Napolitano aims to break deadlock
President Napolitano said that deadlock must not continue, urging political parties to reach a deal on a new government "without delay".
At times his voice cracked with emotion as he delivered his impassioned speech, says the BBC's Alan Johnston in Rome.
Mr Napolitano had been hoping to retire at the end of his first term, but was begged to stay on by squabbling party leaders who could not settle on a mutually-acceptable candidate.
"I could not decline, I was worried about the fate of the country," he told parliament on Monday, to loud applause.
He thanked MPs for their backing, but went on to accuse them of being "deaf" to Italians' call for change.
And he implied that he might step down if the parties did not implement much-needed reforms.
He accused them of allowing progress that had been achieved under the technocratic government of Mario Monti to wither.
He was particularly critical of the failure to enact changes to an electoral law which is widely seen as flawed.
Mr Napolitano called on the party leaders to reach agreement on a broad coalition, saying that was the only option open in the current circumstances.
The election left three parties nearly evenly balanced. But animosity between them has made attempts to build a coalition futile.
The centre-left has a majority in the lower house but not in the Senate, which it also needs in order to govern.
Its leader, Pier Luigi Bersani, was so damaged by the horse-trading over earlier presidential candidates that he said he would resign.
He has rejected any suggestion of a coalition with the centre-right of his ideological enemy Silvio Berlusconi; but his overtures to the Five-Star protest movement led by Beppe Grillo have been firmly rebuffed.


Internet companies should do more to tackle body shaming online, social media users have told an inquiry into how body image affects young people.

One told Parliament's annual Youth Select Committee that "so many" young people were suffering from online abuse and feelings of inadequacy.
There should also be greater diversity in the media, the committee heard.
A Facebook and Instagram policy manager said the sites were committed to making sure users had positive experiences.
The Youth Select Committee, which comprises 11 members aged 13 to 18, chose the topic of body image to consider after nearly one million people voted it as one of the top 10 issues in the UK Youth Parliament's "make your mark" ballot in 2016.
Danny Bowman, who once claimed to be the "world's first selfie addict", told the committee he saw "so many young people who are suffering online" from being bullied or body shamed.
He said his own experiences of social media led him to have a mental health problem over his body image and to him being housebound for six months.
Mr Bowman said he thought Instagram - and the images it has of "six packs left, right and centre" - was "becoming more detrimental, especially to young men".
He added: "I think it translates into the idea of success and failure - a lot of young men are looking at these images and feeling they are inadequate, a failureâ€¦
"If we want to solve this problem we have to go directly to social media networks."
Harnaam Kaur, a body positivity campaigner, said there was a lack of diversity in the media.
Ms Kaur, who has claimed a Guinness world record for her beard, said this had encouraged her to set up an Instagram page.
"That is why Instagram is so important for me, to do photo shoots and show people it is ok to look different.
"I do also feel that companies need to open up their doors to people who do look different and actually stop photo-shopping imagesâ€¦
"The way that women's bodies and men's bodies that are being portrayed are not actually their natural form."
Stephanie Teboah, a plus-size model, said a "Westernised standard of beauty" dominated the media, and called for a greater variety of ethnicities and body types.
However, she credited Instagram as a site that also hosts "body-positive" content, too, adding that users can curate their feeds to see the content they want to see.
Karim Palant, Facebook and Instagram's UK public policy manager, told the committee Instagram was "absolutely committed" to making sure its community is "as positive as possible".
He added that the companies wanted to make sure policies and tools were in place so that "negatives are dealt with as quickly as possible".
The committee, which next meets on 14 July, will also hear from academics, mental health experts, education professionals, and government officials.


CCTV footage of a break-in at a school in County Armagh on Saturday evening has been viewed over 37,000 times.

Carrick Primary School in Lurgan shared footage of the break-in on its Facebook page to "take control of our own situation" and appeal for information.
Principal Alison Lindsay said: "By posting it on Facebook we could actually let people see how shocking the footage is."
Doors and windows were damaged and a tablet computer was stolen.
Ms Lindsay said they believe that the robber has prior knowledge of the school.
"The lights in that classroom are in an unusual place and they have put the lights on," she said.
The video footage shows a man running through the school grounds, kicking down a door and looking through drawers.
The school was surprised by the public's reaction to the video posted on the Facebook page.
"We're just astounded at how the footage has taken off and really the support from the parents has been overwhelming, in seeing if we needed help with anything," Ms Lindsay said.
"Even from the community, people that aren't necessarily connected to the school have been willing to try to lend a hand, to help get the school up and open."
The school opened its doors for Monday's classes after a clean up by staff on Sunday.
We actually feel as staff, violated ... that somebody thought so little of our school that they would do this," the principal said.
"But on the other hand the positives are that everybody has pulled together as a team - everybody has been very determined and even the children this morning are very positive."
Teachers have spoken to the children about the break in, emphasising that 'nobody was hurt.'
Constable Smith from Lurgan Police said: "We would like to hear from anyone who witnessed any activity at the school around these times or anyone who has information which may assist our investigation."


As prisons go, it's a relatively pleasant one.

The Sheshan seminary can be found on a quiet leafy lane that could just as well be in Tuscany as its true location, the outskirts of Shanghai.
There is no barbed wire in sight and no guards, just a solitary, rather friendly watchman on the front gate.
Nonetheless it is, as our inquiries confirm, being used for the effective confinement of China's missing bishop, Thaddeus Ma Daqin.
Friends of Bishop Ma whom I spoke to told me that he does enjoy certain limited freedoms.
He can get permission to come and go from the seminary, they said, but not to leave the wider Shanghai area.
And, as his followers will know, he's been allowed to keep his internet blog updated, although most of the postings are simple, biblical quotes that shed little light on his well-being.
But while he may not be shackled to his bed, his enforced "retreat" continues and, after almost 18 months, the authorities have still not finished with him.
Bishop Ma, we learnt, is being sent to political lessons - communist indoctrination by any other name - three times a week.
In July last year Bishop Ma did a very rare thing: he appeared to publicly challenge the authority of the Communist Party to control the Catholic Church.
In Shanghai's Catholic cathedral, in front of a large congregation including party officials, he used his ordination speech to announce his resignation from the Catholic Patriotic Association (CPA).
The CPA has governed the church in China since 1957, co-opting it into the structure of the state and ensuring that it is unable to become an alternative centre of power.
To any outside observer, Bishop Ma's declaration may not have looked all that defiant.
He wanted to focus all his energies on being a bishop, he said, so it would no longer be "convenient" to continue with the dual role of being a bureaucrat.
But in the eyes of the Chinese authorities it was an extraordinary statement of independence and they moved swiftly against the priest.
He was reportedly taken straight to Sheshan and has not been seen in public since.
The subsequent announcement that he has been stripped of the title of bishop has been strongly contested by Rome.
On the hill above the seminary stands the red brick Sheshan Basilica with its elegant domed bell tower.
Since it was completed in 1935 it has been witness to the many twists and turns in the relationship between the Catholic Church and the Chinese state.
During the worst of times, Chairman Mao's Cultural Revolution, the church was ransacked and the statues and stained glass windows were smashed.
But over the years as the Basilica was gradually restored so too, to a limited extent, were the relations between Rome and Beijing.
Despite the lack of official diplomatic ties and the on-going mutual mistrust a kind of accommodation was reached.
Throughout the 1990s and the early 2000s many of the bishops selected by the Catholic Patriotic Association were also approved by The Vatican.
But in recent years, that tacit deal started to unravel and Beijing has pushed ahead with the ordination of a number of bishops that do not enjoy the support of Rome.
Some observers suggest that relations are now as troubled as they've been in decades and the Sheshan seminary finds itself at the centre of the crisis.
Bishop Thaddeus Ma Daqin - a man who up until his ordination speech was one of the those bishops acceptable to both sides - is now a symbol of the continuing divide.
The issue highlights a long running debate in the Catholic Church about how best to deal with China.
It brings back painful memories of the Vatican's own version of Ostpolitik in the 1960s when it muted its criticism of the Soviet Union in order to build bridges with the church behind the Iron Curtain.
Catholics in China are now waiting to see what kind of a strategy Pope Francis will adopt.
There are some within the wider church who would like it to do more to speak out in support of the unofficial, or underground, Chinese Catholics who pledge allegiance not to the CPA, but to Rome, and risk persecution as a result.
Others suggest that dialogue is the only way forward and that means speaking to and negotiating with the CPA.
But, given that China is politically, economically and diplomatically stronger than it was 10 years ago, the party may be in no mood to negotiate.
It has what it wants, control, and strange as it seems, this atheist state may be even more determined to insist on the right to run the church and appoint its bishops - as well as dismiss them.
We asked at the seminary if it was possible to speak to Bishop Ma.
"We won't even pass on your request," we were told.


Spain's PM Mariano Rajoy has said his Popular Party has a "responsibility" to try to form a cabinet, despite failing to win a majority in Sunday's poll.

The conservatives took most votes, but the traditional Popular Party-Socialist two-party dominance was broken by two newer parties.
The Socialists and one of the two new parties have already ruled out supporting a cabinet led by the PP.
The uncertainty prompted a fall on Monday in the Madrid stock market.
Shares on the Ibex 35 fell 2.8% in early trading, before recovering slightly.
Spain's uncertain future
Fresh faces in Spanish politics
Podemos: Rise of the anti-austerity party
"The Popular Party believes it has a responsibility and a mandate to start a dialogue and explore the viability of a stable government that can offer the necessary certainty inside and outside Spain," Mr Rajoy told reporters.
The comments came after the prime minister met PP leaders.
The PP took 28.72% of the vote in Sunday's election, the Socialists (PSOE) 22.01%, the anti-austerity Podemos party 20.66% and the centrist Ciudadanos 13.93%.
In the 350-seat parliament this translates to: PP (123); PSOE (90); Podemos (69); Ciudadanos (40).
Mr Rajoy earlier said his party was "still the number one force" in Spanish politics.
But Socialist leader Pedro Sanchez said the elections showed that Spain wanted "a move to the left".
Although he acknowledged Mr Rajoy had won the right to have the first attempt at forming a government, Mr Sanchez made it clear he would not back a Rajoy-led government.
Meanwhile, Podemos leader Pablo Iglesias said he would hold talks with all the political groupings but that these had not yet started.
But he insisted Podemos would "not allow the PP to govern".
Mr Iglesias also said those who were talking of a "grand coalition" between the PP and the Socialists had failed to recognise Spain was no longer a two-party system.
Echoing this, Ciudadanos deputy leader Jose Manuel Villegas said: "The two ancient parties, the old left and the old right, won't have power anymore."
The figures show that finding any workable administration could be a tough task.
An alliance between the PP and the liberal Ciudadanos would not provide enough seats for a majority.
But an alliance of the Socialists and Podemos would fall similarly short.
The spotlight could fall on the six smaller groupings, who took 28 seats.
The biggest of these is Erc-Catsi, the Catalonian separatists, with nine seats, but there are other regional separatists from the Basque Country and the Canary Islands.
Joining forces with Mr Rajoy might seem unlikely, given he has called regional separatism the biggest threat to Spanish unity in decades.
In line with the Spanish constitution, after talking to each party, King Felipe VI will nominate a candidate for prime minister. This cannot take place until after the new Congress holds its inaugural meeting on 13 January.
The nominee must then win a vote of confidence in parliament. If this fails, another candidate can be nominated and seek parliamentary approval.
If no administration can be formed within two months of the election, another must be held.
The key issues facing the parties - and which dominated the election - are the economy, corruption, unemployment, regional separatism and social inequality.
Mr Rajoy campaigned on a platform of economic progress, having staved off the threat of collapse. The economy is now one of the fastest-growing in the EU.
Unemployment has been cut, but is still at 21%.
Mr Rajoy's opponents pointed to his harsh austerity measures - big cuts in public spending, tax increases and health reforms - and the suffering they had caused many Spaniards.
The Spanish result echoes similar leftist swings in southern Europe this year. Syriza won in Greece in January. And the success of a leftist grouping in Portugal will also inspire the Spanish left.


Justin Rose faltered as Argentina's Emiliano Grillo claimed his first PGA Tour title with a play-off victory at the Frys.com Open in California.

Grillo, 23, was tied with America's Kevin Na on 15 under after a three-under 69 in his final round and won at the second extra hole with a birdie.
Rose was 14 under after nine holes but three bogeys in his last six holes saw him finish on 12 under after a 72.
Northern Ireland's Rory McIlroy carded a three-under 69 to finish nine under.
This was an improvement on his previous two rounds of 71 but not enough to give the world number three a chance of challenging.
Grillo, who had only earned his tour card two weeks ago by winning the second-tier Web.com Tour Championship, held his nerve superbly in the play-off with 32-year-old Na, putting his third shot to within 10 feet of the hole before sinking the putt for victory.
The win earns him $1.08m (£700,000) and a place in the first major of 2016, the Masters in April.
"You say Masters, I can't believe it,'' said Grillo. "When I got the [PGA Tour] card after the Web.com Championship, I saw I was 71 or 72 in the world and said, 'We got a chance of getting top 50 by the end of the year, let's try to get it done.'
"Maybe we can play the tournaments we always wanted to play."
Earlier, Grillo had moved to the top of the leaderboard after beginning the day two shots back, but Na, who birdied four of his last six holes, including a four on the par-five 18th, forced a play-off.
The pair finished a shot ahead of Americans Justin Thomas (69) and Jason Bohn (70) and Tyrone van Aswegen of South Africa (68).
Another South African, Charl Schwartzel, tied with Rose on 12 under, along with American duo Patrick Rodgers and Kyle Reifers.
Brendan Steele, who led after 18, 36 and 54 holes, shot five bogeys in the last six holes for a four-over 76 and trailed home 17th.


The Japanese yen has climbed by more than 2% against the US dollar, after the Bank of Japan decided to keep interest rates on hold after its two-day meeting.

The BoJ also kept its target for government bond buying unchanged.
But the central bank said it would double its annual purchase of exchange traded funds to 6tn yen ($57bn; Â£43bn) from the current 3.3tn yen.
Market watchers had been expecting more from the central bank.
Expectations were raised after Prime Minister Shinzo Abe announced earlier this week a 28tn yen stimulus plan to help boost the flagging economy.
The Nikkei 225 headed lower after the decision, but the benchmark index clawed into the positive at the end of Friday's session and closed up 0.56% - or 92.43 points - to 16,569.27.
As for the yen it strengthened to 103.67 against the US dollar. Before the Bank of Japan decision, the yen was hovering at around 105.
The central bank's next meeting will take place in September. Analysts say more measures could come from the Bank of Japan later in the year.
"What's noteworthy is that the BoJ has promised to review the effects of its policy at its next meeting, keeping alive expectations of further easing," said Shunsuke Yamada from Bank of America Merrill Lynch.
"This makes the next meeting very important. The yen is likely to be volatile until then."
Data earlier in the day showed Japanese household spending fell 2.2% in June from a year earlier. And retail sales dropped 1.4% in the same month from the previous year.
These are the latest signals that domestic consumption remains weak in the world's third-largest economy.
Meanwhile, core consumer prices fell for a fourth straight month in June, in another blow to Japan's war on deflation.
But industrial output rose 1.9% in June, better than the 0.7% many economists were expecting.
The Bank of Japan introduced a negative interest rate policy in January this year.
Elsewhere in Asia, China's benchmark Shanghai Composite index was lower by 0.3% at 2,984.50.
Meanwhile in Hong Kong the Hang Seng index was down 0.9% in early afternoon trade at 21,979.85.
But shares of Shanghai Fosun Pharmaceutical, trading in Hong Kong were up by more than 2%, outperforming the broader market.
The rise was triggered by news the firm has agreed to acquire up to 86% of India's Gland Pharma, for up to $1.3bn (Â£1bn). The Indian firm manufactures generic injectable drugs, which are mostly sold in the United States. The deal marks the largest acquisition of an Indian company from an overseas interest this year.
In South Korea, the Kospi closed down 0.2% at 2,016.19.
And over in Australia, the benchmark ASX 200 share index rounded off the trading week 0.1% higher at 5,562.30.


Plans for a new 200-bed boutique hotel in Belfast have been granted planning permission by the city's council.

Hasting Hotels bought Windsor House, Ireland's tallest office block, in the city centre in May for £6m.
The company announced its intention to convert the building into a hotel, named the Belfast Grand Central Hotel, that would eventually create 150 jobs.
Belfast City Council's planning committee met on Tuesday night and its members approved the £30m project.
Meanwhile, US insurance company Allstate's plans for a new office development near the former Maysfield Leisure Centre in Belfast were also given the go-ahead.
Concentrix, an American software company, had objected to the plans as it hopes to redevelop a neighbouring site.
Allstate's development is expected to create 200 jobs, as well as provide more than £100,000 worth of community benefits, according to council documents.
Plans from Queen's University for new student accommodation at Lennoxvale in south Belfast were withdrawn on Tuesday morning ahead of the meeting.


A Dundee man who sent sexual texts to a 10-year-old girl has been jailed for two years.

Dean Andrews, 29, was arrested after the girl showed the messages to her mother, who contacted police.
Officers analysing Andrews' mobile phones found more than 200 child abuse images and videos.
Andrews was also placed on the sex offenders register for 10 years after being sentenced at Dundee Sheriff Court.
The court was told that Andrews, who has previous convictions for sexual offences, added the girl on messaging service WhatsApp, but it was unknown where he got her phone number.
He then sent her messages saying: "Hey sexy, coming on WhatsApp today? x", before asking her repeatedly when she was turning 11.
Depute fiscal Kirsten Thomson told the court that Andrews received child abuse material from other people using online messaging service KiK.
Miss Thomson said Andrews told contacts on KiK that he liked girls aged seven to eight.
A total of 191 indecent images and 11 indecent videos of children were recovered, with several at the most severe level.


The story of a Chinese teenager who stowed away on a plane to Dubai, reportedly hoping to make money there as beggar, has sparked a conversation in China about misinformation.

The stowaway was identified by Chinese media as a 16-year-old boy from Sichuan named Xu. He was found on 27 May, hiding in the cargo hold of flight EK303 from Shanghai.
The official Xinhua news agency and the Chengdu Economic Daily reported the boy had said he did it because he had heard beggars in Dubai could make 470,000 yuan ($71,275; Â£49,300) a month.
Earlier this year, there was a story being shared widely on the Twitter-like Sina Weibo with the hashtag #DubaiBeggarsMake470000YuanMonthly.
The China Daily report said non-United Arab Emirates citizens were making a fortune begging, some making 270,000 dirhams (that is where the 470,000 yuan figure comes from).
At the time, people online were saying they were "prepared to go begging in Dubai" and some posts showed flight tickets with the caption "Do not stop me going".
After Tuesday's story about Xu the hashtag is trending once again, with some people expressing amusement and others being much more critical.
"People with dreams deserve praises," said Chi Ma Xiao De Xiao Ma Fa.
But Kai Ge Lu - Deng Ta Hui Lai said on Weibo: "Are people who praise the teenager being serious? Everyone knows that entering the country in that way is illegal.
"Also, the teenager wants to reap without sowing if he wants to be a beggar in Dubai to make money."
Some users were blaming the media for spreading rumours about the riches of Dubai.
On CCTV's official Weibo account, a user left the comment: "Media that have been publishing inaccurate reports should bear responsibility. They should be held accountable."
BBC Chinese also spoke to two travellers from Shanghai to Dubai who thought social media reports had misled the boy.
So is there any truth to the story?
The China Daily report appears to be based on a story on Gulf News from April this year when Dubai police arrested a beggar who they said was making 270,000 dirhams per month.
Dubai police carry out campaigns to stop begging on the streets and the man was arrested as part of the raid.
Police said they had caught "professional" beggars, some of them carrying passports with business or tourist visas, but did not say how many of the 59 beggars detained were found with large amounts of money.
Reporting by Grace Tsoi, Yashan Zhao, Saira Asher and Kerry Allen


Further education colleges in Wales are bearing more than their fair share of cuts within the sector, according to the organisation representing them.

Mark Jones, chair of ColegauCymru / CollegesWales, said three years of cutbacks will make it a "difficult" time for adult learners.
His warning comes as £28m could be cut from education and skills in the Welsh government's draft budget for 2015/16.
The Welsh government said it will work to manage the impact of any cutbacks.
Mr Jones, who is also the principal of Gower College in Swansea, said there are inefficiencies within other areas of the education sector in Wales.
Speaking to the BBC's Sunday Politics Wales programme, he said: "We've had two tough years already, we had a cut two years ago, we had a cut this year.
"The sector, for example, spent £9m on restructuring last year to get ready for this year.
"The sector this year will have a surplus of about 1% which isn't enough money to reinvest in all the facilities and equipment and the staff we need.
"On top of that 1% we're expecting somewhere between a 3.2% and 5% cut going forward."
He said he understood many cuts would affect adult learners aged 19 and over.
"Adult learning is very complex - it's not just about adults coming in to do a two-hour week IT or French course," he explained.
"It's all about apprenticeships, it's all about us working in industry to develop employees - there are different parts of adult learning, but that's likely where the hits are going to be."
Mr Jones said further education in Wales had been through lots of changes but the quality has improved "dramatically".
Julie James, the newly appointed Deputy Minister for Skills and Technology, conceded further education colleges faced difficult times.
"They are hit, there's no doubt that," she said.
"But they agree with our priorities and they've been extremely cooperative with us. We've put an enormous amount of additional funding into college buildings.
"We agree lots of the courses are going to be struggling a little but we have European Social Fund bids in to mitigate some of that and we expect our employers to step up to the plate as well."
Watch Sunday Politics on BBC1 Wales at 14:15 BST on Sunday.


A village in Carmarthenshire hosted its own Super Saturday as a local rugby club took on a national team.

Nantgaredig RFC beat Sweden 46-5 on the final day of the Six Nations rugby tournament.
The village has a population of little more than 500 people.
The match was organised by Nantgaredig coach and committee member, John George "JG" Phillips, and was the first time the club had taken on a country.
Nantgaredig RFC is currently sitting third in the  WRU Division 3 West B league, playing the likes of Amman United, Lampeter Town and Llandeilo.
Meanwhile, Sweden is ranked 57th in the world.
Mr Phillips has lived and played rugby in Sweden and is good friends with the elite manager of the Swedish rugby team, Neil Johnson.
At this time of year, Mr Phillips said Sweden has no grass for the rugby team to play on and, with European games against Latvia and Lithuania coming up, the side needed to "get some rugby under their belts".
The Swedish side has travelled to Carmarthenshire for three days.
They played Carmarthen Athletic in a friendly on Thursday, losing 34 points to 3.
Mr Phillips said before the game: "They looked pretty sharp against Carmarthen Athletic, especially after they'd been training all day.
"They're young, fit, strong guys and the game against us is going to be a tough match.
"For them it's as much about the experience."
Mr Johnson, who is Scottish and has lived in Sweden since 1989, said they had received a "very warm welcome" at Nantgaredig.
"The welcome has been brilliant," he said. "Some of the guys were really surprised just to what level.
"A lot of Swedes go down to New Zealand thinking that it's the heartland of rugby and I say 'you just have to go across to Wales'."
Swedish coach, Mr Johnson, said rugby was the fastest growing team sport in Sweden last year and they are hoping a 10-year strategy focusing on grass roots rugby will boost its profile further.
The match took place at Ystrad Fields, Nantgaredig.


The final resident living on the crumbling seafront of a Norfolk village has said she will remain defiant despite her last set of neighbours moving out.

Bryony Nierop-Reading, whose house perches just metres from the cliff edge on Beach Road, Happisburgh, said she would stay until given no other option.
The 65-year-old turned down compensation to move inland last year.
"It's more powerful to argue for something if you are on the spot," said Mrs Nierop-Reading.
"Also it's nearly everybody's dream to live by the sea."
Mrs Nierop-Reading lived three miles (4.8km) inland in Witton until she moved to her "cultural hub" of Happisburgh in 2008, despite the dangers of living so close to the sea.
"Occasionally it makes one panic stricken," she said. "But most of the time I feel extremely safe here.
"Every morning I go to the French windows and open them and listen to the sea. The view is incredible."
Her last neighbours - the Gilbert family from Nottinghamshire - said farewell to their holiday home during Easter 2011 after accepting a compensation deal offered to them by North Norfolk District Council's Coastal Pathfinder project.
Ten out of 13 homeowners on Beach Road accepted a share of Â£726,000 compensation this month out of a pot of Â£3m earmarked to help the cliff-top residents.
David and Jill Gilbert were sad to see their property, which they purchased in 1976, slowly lose its battle with the sea.
"We've had honeymoons down here, weddings, 80th birthday parties, 21st parties and big family get-togethers," said Mrs Gilbert.
Mr Gilbert added: "It's been really sad. About eight years ago [the cliff] went very quickly and we thought 'that's it', but we've hung on over the last few years."
Other owners on the road planning to move out in the next few weeks include Diana Wrightson, who with her business partner Jill Morris ran a guest house and tea garden for 26 years at Cliff House.
She accepted compensation worth 40% of what her house would have been worth if it was not at risk from coastal erosion.
"It's very sad to see it happen and what makes it more sad is that it was absolutely unnecessary to allow it to get to this stage," said Happisburgh resident Malcolm Kerby from the Coastal Concern Action Group (CCAG), which was set up to help the community fight against the onset of the sea.
Mrs Nierop-Reading knows that one day she will also have to move from her beloved home and feels sympathy for the Gilberts, who became the last family on Beach Road to abandon their house.
"I must say if I'd have been perched where they are I think I would have done the same thing - they don't have much alternative," said the grandmother of six.
"For all the people who'd been here for a long, long timeâ€¦ they moved here when the council had promised to keep the sea defences up and they have ended up taking Pathfinder money, but they've also got a sense of betrayal.
"I came here knowing it would go eventually and so I'm in a very different position to them. Thankfully I wasn't offered enough money to tempt me."
There are currently no funds set aside to maintain or improve the aging sea defences at Happisburgh, but a scheme is in place to move the cliff-top car park and possibly build a new shop and toilet block in the village.
"The NN Pathfinder has been applauded by local people as well as government officials and we are pleased that we have been able to undertake a number of successful projects," said Peter Battrick from North Norfolk District Council.
"But there is a specific amount of money for a specific set of projects," he added.
The council is set to demolish the vacant Beach Road properties in the summer.


Relatives of one of the victims of a torpedo attack which claimed 250 lives have provided a wreath laid by divers to mark its 100th anniversary.

HMS Pathfinder went down off St Abbs Head in the Scottish Borders on 5 September 1914.
A team of divers from the British Sub-Aqua Club (BSAC) took a tribute down to the wreck.
Paul Ratcliff, 74, from Canterbury, lost an uncle he never met in the disaster and wanted to mark the event.
William Austin, known as Bill, was just 19 when he was on board when HMS Pathfinder was struck by a torpedo fired from a German U-boat.
It ignited the ship's magazine and the destroyer sank with the loss of 250 lives.
Mr Ratcliff and his brothers David and Colin met the divers to present them with a wreath to lay on the wreck.
He said: "My family originated in the Canterbury area and I can't imagine my grandparents being able to travel to Scotland when the Pathfinder sank to remember Bill or the other sailors.
"Travel wasn't so easy then and it just wouldn't have been possible.
"Bill was my mother's brother and he wasn't the only one to die in the Great War as her other brother, Jack, who was a solider in the Royal West Kent Regiment and also just 19, died at Passchendaele.
"His body was never recovered and he has no grave."
Mr Ratcliff, who is a retired local authority education welfare officer, said he had been researching his family's history and what happened to both his uncles during World War One.
He was studying the history of HMS Pathfinder and discovered that the group of BSAC divers were planning a commemorative dive on the 100th anniversary of the sinking.
The family had planned to lay a wreath nearby but then contacted the divers to see if they could place it on the wreck of the vessel.
A team of 20 took part in the dive and also took photographs and video footage.
BSAC National Diving Committee member and group leader for diver coaching, Dave Lock, 63, from Felixstowe, led the HMS Pathfinder dive team and said he was pleased to speak to Mr Ratcliff and hear his family's story.
He said: "I think it reminds us that this isn't just a wreck but a real human tragedy that still affects families today.
"We must remember that around 250 souls were lost that day.
"Best estimates put the crew at 268 and there were only 18 survivors."


The bosses of the four biggest polluting companies in history talking about how they can help solve global warming may seem like the height of hypocrisy.

Chevron, Exxon Mobil, BP and Shell are responsible for more than 10% of all greenhouse gases emitted since the industrial revolution, and yet here they are, talking under the banner: "Natural gas as a core pillar for a sustainable future of the planet".
Exxon boss Rex Tillerson manages to use the word environment 13 times in his opening address. "[Our industry] can deliver significant environmental benefits", he says, while Shell's Ben Van Beurden follows with "gas can help in securing a sustainable energy future."
These comments reflect the key theme at this year's World Gas Conference in Paris, as energy bosses look to rebrand their fossil-fuel businesses as a crucial weapon in the fight against climate change. (Or rather half their businesses - there was no mention of the fact they are also major oil producers).
But this is not as ridiculous as it may seem.
For a start, their argument that natural gas emits half as much CO2 as coal and should, therefore, be used to support renewables, is legitimate. As is the point that US CO2 emissions have fallen sharply on the back of shale gas discoveries.
But more importantly, this attempt to disassociate gas from coal and oil, and present it as a cleaner fuel source, shows that energy companies have accepted the fact that reducing CO2 emissions is now firmly established on political and, increasingly, corporate agendas across the world.
A number of energy companies have signed up to the World Bank initiative to end routine gas flaring by 2030 - a process of burning off excess gas at extraction that emits about 300m tonnes of CO2 every year.
Many, including Total, BP and Shell, have also made a joint call for an effective carbon price, which would force big polluters to pay more for the CO2 they emit. This may seem odd given these very same companies will be hit, but this call is clearly out of self interest - the biggest rival to gas is coal, and coal producers will be hit far harder.
Coal is cheap and abundant, and the only way gas producers can compete on price is if carbon is taxed, even if this means the oil side of their business suffers.
But it's not just about CO2. Many gas executives are at great pains to highlight the growing problem of air quality around the world, particularly in China.
Gas, Mr van Beurden says, emits 90% fewer air pollutants than coal, a fact that should not be overlooked in a world where there are seven million deaths linked to pollution every year, according to the World Health Organization.
And just as gas cannot compete with coal on price, it cannot match the environmental credentials of renewables. The gas industry has responded by saying the two complement each other perfectly. It argues renewables, such as solar, wind and hydro power, cannot alone meet the growing demand for energy, which is estimated to rise by as much as 40% in the next 20 years.
Just as importantly, executives say, solar and wind power are variable, so gas is the most environmentally-friendly fossil fuel to act as a back up when renewables cannot satisfy demand. Gas plants are also relatively flexible and can be turned on and off more quickly and cheaply than coal and nuclear plants.
And they also point to the potential of gas for storing energy from renewables. Batteries are grabbing all the headlines, but gas offers a viable alternative, particularly for larger-scale storage.
Finally, gas can be used to power vehicles with much lower emissions than oil-based petrol or diesel. Argentina, for example, has more than two million natural gas vehicles, with Brazil not far behind.
All of this means that "gas is not part of the problem, but part of the solution," Mr Dudley says.
This is all well and good, but the simple fact remains that despite the industry's efforts to convince us otherwise, natural gas remains a fossil fuel that emits harmful CO2. And lots of it.
So simply switching from coal to gas is not the answer. In fact, if all the coal power stations in the world were turned off and replaced with modern gas-fired plants, total global CO2 emissions would fall by about five billion tonnes a year to 25 billion tonnes, according to Laszlo Varro at the International Energy Agency (IEA).
Emissions need to fall to about five billion tonnes for the climate to stabilise, he says.
One way to make gas cleaner is carbon capture and storage (CCS), but the world has been very slow to develop this technology - there is just one commercial scale CCS coal plant and no gas plants.
What is clear, however, is that as things stand, renewables alone cannot satisfy the world's growing demand for energy. In theory, it would be possible to power the world solely with solar panels, but variability remains the major drawback. And while batteries can be used to store energy during the day for use at night, they cannot store energy in the summer to use in winter.
This is why "we are going to continue to need conventional power generation for a long time," says Mr Varro. And as gas is the cleanest fossil fuel, it is "the best candidate for filling the gap", he adds.
For this reason natural gas use will grow significantly in the coming years, potentially to the point where it overtakes coal and oil as the world's preferred hydrocarbon. At some point in the next 20-30 years, however, gas use will have to start falling to avoid dangerous climate change.
This reliance on gas could be reduced significantly if governments invest in large-scale energy storage systems and, more importantly, in renewable energy that is not variable, such as tidal and geothermal.
The technologies to wean ourselves off fossil fuels are available. The problem is, with current models of financing, developing them at scale is, for now, proving too expensive.


Like thousands of other children, 10-year-old Jolene and Matthew, nine, are at a summer scheme this week.

Theirs, taking place at Victoria Primary School in Newtownards, County Down, is a scheme with a difference.
It is for children in foster care, and they are getting help with English and maths as well as having fun.
It is one of only five in Northern Ireland specifically for fostered children of primary school age, and is run by the Fostering Network.
The network's director Kathleen Toner said children in foster care often struggle in school.
"Children who come into the care system may have had experiences of trauma or neglect," she said.
"They will have had fractured family relationships, and about a third are disabled.
"They can be in different placements as well, so they could have had several foster carers.
"So they often find it difficult to engage in school because they have lots of other things going on in their heads.
"Our schemes are about supporting the foster carers and the children to improve their educational outcomes."
Some may be the only foster child in their school, so the scheme helps them to realise they are not alone.
"They come here and they see that other children have similar experiences to them and they're not that different," Ms Toner said.
There are around 2,000 children living with foster families in Northern Ireland.
The Fostering Network's five summer schemes all cater for small groups of 12 to 15.
Jeffrey Dodds, a primary seven teacher at Victoria Primary School, gives up a week of his summer holiday to teach the children.
He begins planning activities months before the end of the school year.
"Some of the things we have on the programme are a maths tournament, so we look at maths skills," he said.
"We incorporate that into games like dominos."
"We're going to visit the local library and we've been to [the science and discovery centre] W5, so we use all of those activities to enhance the learning the children experience."
Jolene likes football and plays for two local teams, while Matthew likes climbing and playing computer games.
Both agreed that the scheme was better than school.
"It's good because it's fun to do," said Jolene.


A Conservative peer has argued the Queen's carriage should have been clamped with President Xi Jinping inside to "teach him a lesson" over unpaid parking and congestion fees.

Lord Berkeley said the Chinese embassy owes Â£2m in congestion charges.
He went on to ask: "Why did Boris not think of clamping the Queen's horse and carriage yesterday, with the president inside it?"
A government minister admitted there was a "legal impasse" in this area.
On Wednesday the Queen and the Chinese president were driven by carriage along The Mall to Buckingham Palace, where the president and his wife have been staying during their state visit.
Lord Berkeley wanted to know "why does TfL not get out and clamp all these Rolls-Royces", later adding: "It might have taught him [President Xi] a lesson."
The government's annual written statement published earlier this year showed the US owed more than Â£9m and China more than Â£2m in congestion charges incurred between 2003 and 2014.
Foreign Office Minister Lord Courtown said officials from his department "regularly lobby diplomatic missions about outstanding debts" but reminded the House of Lords that diplomatic vehicles are "inviolable".
He explained that there was "a particular problem at the moment" with the London congestion charge, as "some overseas diplomatic missions consider that it is a tax as opposed to a charge".
"Officials from the Department for Transport and Transport for London continue to press non-paying diplomatic missions to pay the congestion charge, and work to identify a solution to the legal impasse with non-paying missions," the minister insisted.
He also told peers, when quizzed by former head of the Diplomatic Service Lord Wright, that the Foreign Office pays its fines in other countries "as much as it can".


Theresa May has ruled out cuts to the UK foreign aid budget if she wins the election but doubts have been cast on other existing Conservative pledges.

The prime minister said the commitment to spending 0.7% of national income on aid "will remain" although it must be spent "in the most effective way".
It follows speculation she was ready to drop it from the Tory manifesto.
But she declined to guarantee existing spending on state pensions which ensures a minimum 2.5% annual increase.
Meanwhile, Chancellor Philip Hammond has hinted that a pledge in the 2015 Conservative manifesto not to raise income tax, VAT or National Insurance before 2020 could be abandoned.
In other general election developments:
The 0.7% aid commitment was adopted by David Cameron when he became prime minister in 2010 and later enshrined in law.
The UK has met the international target - which originates in United Nations aspirations from the 1970s - every year since 2013. There has been talk it might be among a number of high-profile policies championed by Mrs May's predecessor that she might drop to ease pressure on the public finances.
But asked about its future at an election campaign event in Berkshire, Mrs May said: "Let's be clear, the 0.7% commitment remains and will remain.
"What we need to do though is look at how that money is spent and make sure that we are able to spend that money in the most effective way."
Former chancellor George Osborne welcomed Mrs May's pledge, tweeting that it was the "morally right" thing to do and would maintain the UK's global "influence".
Leading aid organisations, including Unicef and Save The Children, expressed delight at the development, which comes 24 hours after Microsoft founder and philanthropist Bill Gates warned that ending the commitment would cost lives.
But the Taxpayers Alliance campaign group said it was disappointed that the "arbitrary and meaningless" target was not being dispensed with.
Foreign aid has been ringfenced from public spending cuts over the past seven years and has been one of the few areas to see a large increase in budgets.
In 2015, the last year for which figures are available, the UK spent £12.1bn on overseas development assistance. This was projected to rise to £13.3bn in 2016.
This has proved unpopular with some Tory MPs at a time of austerity in domestic public services and amid media reports about waste in certain aid projects.
The BBC's political correspondent Chris Mason said a senior Conservative source, familiar with the aid budget, refused to be drawn as to whether this amounted to an acceptance of how aid spending is currently defined, or could potentially include a broadening of what would count as aid spending in future.
Asked about another of the Conservatives' 2015 election manifesto commitments - the so-called "triple lock" on the state pension which guarantees an annual rise of at least 2.5% - Mrs May declined to confirm it would stay in force.
"What I would say to pensioners, is just look what the Conservatives in government have done," she said.
"Pensioners today, £1,250 a year better off as a result of action that has been taken. We were very clear about the need to support people in their old age and that's exactly what we've done".
The triple lock - which pegs the state pension to annual increases in prices or earnings, whichever is higher, or a minimum of 2.5% - was introduced by the Conservative-Lib Dem coalition government in 2010.
A review carried out by the former CBI boss John Cridland earlier this year recommended it be ended. He warned that if it remained in place, an extra 1% of GDP - equivalent to £19.5bn in current prices - would probably have to be spent on pensions by 2036-37.
Labour, which has vowed to retain the lock and other pensioner benefits such as the winter fuel allowance if elected, said its opponents were "abandoning older people".
Speaking in Washington DC, Mr Hammond also cast doubt on David Cameron's 2015 pledge not to raise income tax, VAT or National Insurance before 2020.
He told the BBC that while no final decision had been taken, the government needed "flexibility" on taxes.
The BBC's economics editor Kamal Ahmed said it was the clearest hint yet that Mr Hammond - who was forced to backtrack on his proposed Budget rise in NI contributions for the self-employed - would like to see the promise significantly amended if not ditched altogether.


A retired Edinburgh bus driver has been awarded a prestigious medal by Russia for his role in the 1944 Arctic Convoy.

Alex Ramsay, 88, was presented with the Ushakov Medal at his home in Portobello.
Andrey Pritsepov, the Russian Consul General, also handed Mr Ramsay a bottle of Russian vodka.
A veteran of the merchant navy, Mr Ramsay was among those who braved freezing conditions to deliver vital supplies to Russia.
From 1941 to 1945 Allied ships sailed from Scotland and Iceland to supply the country with food and weapons.
More than 3,000 seamen lost their lives to the freezing conditions and attacks by German submarines and aircraft.
Mr Ramsay said: "I am thrilled to receive another medal for my involvement in the war effort - it gives me a reason to reflect on the time I spent in the merchant navy.
"My main memory of the convoy was the camaraderie and the great team spirit on the boat, whilst we battled the enduring and bitterly cold weather."
The medal is named after Fyodor Ushakov, an 18th Century naval commander.
It is awarded to veterans "for personal courage and valour shown during World War Two while participating in the Arctic Convoys".
Linda Mason, retirement manager at Milton Court sheltered housing complex where the great grandfather lives, said: "We are all so very proud of Alex's achievements - he is an unassuming and modest man but his story is truly inspiring.
"His three older brothers enrolled in the army, and at just 16 Alex was technically too young. But he was determined to play his part, against his mother's will, and to contribute to the war effort."


An independent Scotland would have to apply to Nato as a new state, secretary general Anders Fogh Rasmussen has said.

In an interview published in the Times, Mr Rasmussen is quoted saying Scotland's membership would have to be approved by the other member states.
The Scottish government said membership was "in the strong interests of the rest of the alliance".
Pro-Union campaigners claimed the SNP's plan to join Nato "isn't credible" if it removes Trident nuclear weapons.
"I am not going to interfere at all with a campaign leading up to the referendum in Scotland, but I can inform you about procedures and the facts," Mr Rasmussen told The Times.
"In [the] case that Scotland voted in favour of independence then Scotland would have to apply for membership of Nato as a new independent state.
"A decision on accession would have to be taken by unanimity, by consensus as always in Nato."
He added: "Some aspiring countries have waited for many years. Others enjoy a very short procedure depending on how close they are to fulfilling the necessary criteria."
The UK is a founder member of the Nato alliance, which now encompasses 28 states.
In 2012 the SNP, which currently forms the Scottish government, voted to end its 30-year opposition to Nato. Two MSPs, John Finnie and Jean Urquhart, left the party in protest at the policy change.
The party has maintained support for nuclear disarmament and has committed to removing the UK's Trident weapons system from Scotland if voters back independence in the forthcoming referendum.
Speaking for the Better Together campaign, former UK Defence Secretary Lord Browne said: "Alex Salmond has not explained how he intends to remove our nuclear deterrent whilst simultaneously rejoining a nuclear alliance. It simply isn't credible.
"Today we have the ability to make a difference in our world. We have seat at the top table in Nato, the EU, the UN and the G7.
"Our membership of Nato as part of the UK gives us a level of security that cannot be guaranteed if we vote for independence. Why put that at risk?"
A spokesman for the Scottish government said: "The Nato secretary general has simply outlined the process we are already aware of.
"We have made clear that, following a vote for independence, the Scottish government will notify Nato of our intention to join the alliance and negotiate a transition from membership as part of the UK to independent membership, taking our place as one of the many non-nuclear members.
"Nato's own stated intention is for membership to be open to all European democracies that meet the membership criteria â€” and given that Scotland occupies a key strategic location in the North Atlantic we believe our continued membership will be in the strong interests of the rest of the alliance."
In a previous interview in June, Mr Rasmussen said Nato had not discussed the implications of a "Yes" vote in the referendum, adding that the issue was "for the Scottish people to decide".


A piano festival in Liverpool is giving people the chance to show off their playing skills to the public.

Media playback is unsupported on your device
11 July 2014 Last updated at 13:28 BST
The Tickle the Ivories festival, now in its fourth year, has seen six pianos positioned around the city centre for public use.
Those who step up to the keys are licensed to busk, meaning they can keep whatever proceeds they make.
The festival, which is run in conjunction with Open Culture Liverpool, continues until 7 September.


US academics Thomas Sargent and Christopher Sims have won the 2011 Nobel economics prize.

The Royal Swedish Academy of Sciences cited "their empirical research on cause and effect in the macroeconomy".
They had studied how economic policy, such as raising interest rates or cutting taxes, affects macroeconomic variables such as GDP and inflation.
The award's official name is the Sveriges Riksbank Prize in Economic Sciences in Memory of Alfred Nobel.
It was not part of the original group of awards set out in Swedish chemist Alfred Nobel's 1895 will, but was established by Sweden's central bank, the Riksbank, in 1968.
The five main prizes are in physics, chemistry, medicine, literature and peace.
Thomas Sargent, 68, is a professor of economics at New York University.
The academy pointed to his work examining the post-World War II era, when many countries initially tended to implement a high-inflation policy, but eventually introduced systematic changes in economic policy and reverted to a lower inflation rate.
Christopher Sims, also 68, is a professor of economics and banking at Princeton University.
The academy said he had developed a method based on "vector autoregression" to analyse how the economy is affected by temporary changes in economic policy and other factors -  for instance, the effects of an increase in the interest rate set by a central bank.
Prof Sims said: "I think that the methods that I have used and that Tom has developed are essential to finding our way out of this mess."
Peter Diamond, Dale Mortensen and Christopher Pissarides won the 2010 prize for their work on how regulation and policy affects jobs and wages.


Welshman Elfyn Evans was the best-placed British driver as reigning champion Sebastien Ogier won the opening round of the World Rally Championship (WRC) in Monte Carlo.

The 28-year old Dolgellau-based driver won three out of the 17 stages in the M-Sport Ford Fiesta in his first event since returning to WRC.
He and co-driver Daniel Barritt finished in sixth place overall.
Evans was more than six minutes behind team-mate Ogier.
Toyota's Jari-Matti Latvala finished in second place, with M-Sport's Ott Tanak in third.
Evans drove for M-Sport in the top class for two seasons in 2014 and 2015, but was demoted to the WRC2 class in 2016.
The second round of the WRC starts in Sweden on 9 February.


India's ratification of the Paris global climate agreement on Sunday comes nearly a year after it was signed by 191 countries in the French capital.

Last December in Paris, countries agreed to cut emissions in a bid to keep the global average rise in temperatures below 2C. The Paris deal is the world's first comprehensive climate agreement.
It also says signatories will strive to limit warming to 1.5C, a more ambitious goal, demanded by poor and very vulnerable countries.
Scientists have warned that warming above 2C will result in dangerous climate change, leading to a rise in sea levels, floods and landslides, droughts and wildfires, among other disasters.
India ratifies Paris climate deal
The world has already become 1C warmer since industrialisation began. Scientists blame this on greenhouse gases emitted by the burning of fossil fuels.
The emitted gases, mainly carbon dioxide, are said to be dangerously concentrating in the atmosphere, which traps in the heat from the sun and causes climatic changes.
The Paris climate agreement needs to be ratified by countries accounting for at least 55% of global emissions before it can come into force.
Sixty one countries, accounting for nearly 48% of total greenhouse gas emissions have already ratified the agreement.,
India's ratification will now take that figure close to the threshold, as the country accounts for nearly 7% of the world's emissions.
UN officials have said the agreement is set to become a law by the end of this year.
The progress with this agreement has been quite remarkable compared to the Kyoto protocol, the first treaty to cut down carbon emissions. Although it was signed in 1997, it came into force only in 2005 and has now been more or less phased out.
India is the world's third largest carbon emitter after China and the US - both of whom have already ratified the Paris agreement.
In terms of per capita emissions however, it is 10th on the list, as its emissions are less than 2.5 tonnes per capita. The US tops this list with nearly 20 tonnes per capita.
Delhi has also pledged to reduce the rate of its emissions by up to 35% by 2030.
Under a voluntary plan submitted to the UN climate convention, it says it will work on sourcing 40% of its electricity needs from non-fossil fuel sources, and listed solar and wind as its first two options.
However, Delhi's plans to also double annual production of coal - the dirtiest of fossil fuels - to more than one billion tonnes remains a very controversial issue.
Like other fast emerging economies, India has argued that it needs the cheap fossil-fuelled energy to pursue development work, and is therefore asking already developed countries to make deeper emission cuts.
But, developed countries have said that rapidly developing countries like China and India will also need to make big reductions in their emissions for a global climate agreement to actually work.
The Paris deal is largely legally non-binding and it is yet to have a mechanism to verify which country has actually cut emissions by how much.
Unless that is secured, critics say, the agreement will remain on paper only.


South Africa midfielder Dean Furman has spoken of the "utter devastation" that has engulfed his team-mates following the death of captain Senzo Meyiwa.

Meyiwa, 27, was reportedly shot dead in what appeared to be a robbery at his girlfriend's house on Sunday.
Furman, who plays for Doncaster Rovers, told BBC Sport: "It's complete and utter shock and devastation.
"He has a young family so there's more to it than losing a footballer - someone's lost a dad."
Meyiwa, a goalkeeper, played for Orlando Pirates and featured in South Africa's last four Africa Cup of Nations qualifiers.
Media playback is not supported on this device
On Saturday, he was in action for his club, when they progressed to the semi-finals of the South African League Cup.
He was reportedly attacked after men entered his girlfriend's house in Vosloorus, south of Johannesburg and was pronounced dead upon arrival at hospital.
Former Chelsea, Rangers and Oldham player Furman, who has 18 caps for South Africa, described Meyiwa as a "lovely guy".
He added: "He was very respectful, very friendly and he was just the nicest guy you could wish to meet. He had a lot of great relationships within the team, kept everyone together and his performances were exemplary."
"We don't know what happened but whatever has it's a life taken away far too soon."
Furman, 26, added that he had last spoken to Meyiwa when they were on international duty earlier in October.
"I was with him three weeks ago and I've got a picture in my phone that keeps going through my head," he said. "We were in Congo for one of the recent qualifiers and the picture was when we were last together. It shows how happy he was and how well he was doing."
Former South Africa international defender Mark Fish, who also played for Orlando Pirates, told BBC Radio 5 Live: "He's been an absolute stalwart for Orlando Pirates. The news is very disappointing for Orlando Pirates and South Africa football fans but also devastating for his family.
"I'm sure he'll be remembered for the good things he did on the football field. He showed a lot of passion and commitment."
Fifa president Sepp Blatter also paid tribute to Meyiwa on Twitter.
"Thoughts with family, players and fans of Orlando Pirates and South Africa. A senseless, tragic loss. #RIPSenzoMeyiwa".
South Africa's domestic soccer league has postponed this weekend's derby between Orlando Pirates and Kaiser Chiefs as a mark of respect.
"That's the right thing to do," said Brand de Villiers, chief executive of the Professional Soccer League in South Africa.


Bristol City have signed Oxford United winger Callum O'Dowda for a fee of at least £1m.

The 21-year-old, who scored 10 goals in 50 appearances for the U's last season, has signed a three-year contract with the Championship side.
O'Dowda made his Republic of Ireland debut against Belarus in May, and scored in Oxford's Johnstone's Paint Trophy final defeat by Barnsley.
"He's a real emerging talent," said Bristol City head coach Lee Johnson.
"Callum isn't exactly under the radar because there was a lot of interest in him, so we're delighted he's joined us - we believe he can continue the progression he has already shown."
O'Dowda, who had two years left on his contract with hometown club Oxford, had missed the start of their pre-season tour to Spain because of "illness".
The fee could rise to £1.6m, with Oxford owed a percentage of any future sale.
Find all the latest football transfers on our dedicated page.


A large fire has broken out at a convention centre in the western German city of Duesseldorf.

The centre acts as an accommodation hub for refugees waiting to be sent elsewhere in North Rhine-Westphalia.
Everyone inside hall 18, where 180 refugees were staying, was brought to safety, according to reports.
As the fire raged, a thick, black plume of smoke could be seen across Duesseldorf.
The smoke drifted close to the flight path from Duesseldorf airport.
The fire department advised those in the north of the city to keep windows and doors shut, reported RP Online (in German). Some 70 firefighters were at the scene.
Ben Smith, a former BBC reporter, was waiting for a flight when he saw smoke rising up on the other side of the airport.
"The smoke was thick and pretty quickly a column was reaching up and flames started to appear," he said.
"It caused a bit of a stir among passengers but it became clear pretty quickly that it wasn't a plane or an airport building.
"Flights were continuing to land as all this was going on. The fire wasn't that far from the runway but the smoke wasn't blowing [in the direction of the airport]."


The NI economy minister is in "cloud cuckoo land" if he believes a projected £490m overspend in a controversial renewable heating scheme could be reduced to zero, says the law professor who once taught him.

Dr David Capper lectures in contract law at Queen's University.
He expressed concern that Mr Hamilton's proposal for the recovery of RHI costs "has litigation written all over it".
"There will be a cost. A price will have to be paid," he told the BBC.
Dr Capper said he believed that any legislation to amend the scheme would have to include compensation and other protections for people who had availed of it.
He believed there was also the possibility of legal challenges.
Dr Capper added that fast-tracked legislation to rectify the problem is unlikely to work.
"Historically, the quicker legislation is drafted, the poorer the quality, because there's less time to reflect upon the problems that need to be addressed," he said.
"This is emergency legislation, but it's not like the kind that was passed between the two world wars when lives were at stake.
"It's only money that's at stake here, so they'd be well advised to take time to work out what problems need to be addressed and do it properly."
He explained that the letter sent to those who installed the boilers constitutes a contract between them and the government.
"What the executive is currently considering is passing legislation that would override those contracts.
"Effectively, they have introduced this Renewable Heating Incentive through statutory regulations and they want to revoke those regulations."
Although Dr Capper stressed that the executive is entitled to revoke regulation, he added that the European Convention on Human Rights contains provisions that would offer a level of protection to the boiler owners.
"The starting point is that if the contracts go, [the owners] don't have any rights to legal redress. However, the assembly does not have omnipotent power to pass whatever legislation it wants to pass.
"The European Convention on Human Rights contains a key provision guaranteeing people's rights of property.
"But for the government, that article does contain a 'get-out' clause, whereby the state can regulate people's use of property in the general interest.
"Obviously, the DUP and others will be [pointing to] the fiscal chaos that would be caused by this scheme if it were not terminated.
"The very severe burden that would place upon the tax payer constitutes a general interest that would justify the revocation of these contracts."
However, Stormont have a duty in law to "act proportionately", he said:  "The state can't take a sledgehammer to crack a nut.
"If the executive were to pass legislation that said this scheme is terminated and you just have to live with it, that's legislation that would struggle to survive judicial scrutiny."
He said "protections", such as compensation, would need to be incorporated into any proposed legislation.
"The more detailed the legislation, the more likely it will be to survive judicial scrutiny.
"The aim of the executive will obviously be to try and pay a price that's less than the price they'd pay if the scheme was to continue for 20 years.
"But it would be a fool who would say this could never end up in court - this has litigation written all over it."


A Labour government could give employees the right to take over their companies if they are sold, dissolved or floated on the stock market.

Shadow Chancellor John McDonnell says the party does not want to return to an era of widespread state ownership.
Instead, Labour would look to expand co-operatives and explore giving workers the "right to own".
David Cameron has accused Labour of wanting to turn back the clock to the days of state ownership and strikes.
But Mr McDonnell tackled this claim head-on in a speech in Manchester, saying Labour had to move on from its traditional belief that state ownership was always the answer.
"Whatever the achievements of the past, we cannot simply turn the clock back - whether to 1997, 1964, or 1945," he said.
At the last election, "the Tories talked relentlessly, overwhelmingly about the future. Labour, strikingly, did not".
"We cannot allow that to happen again. We cannot be small 'c' conservatives."
He added: "A future Labour government will end the current programme of spending cuts. We will protect what has already been won.
"But we must look beyond this point. We should be seizing the opportunity to create a fairer, more democratic society."
Labour has already announced its intention to return the railways to public ownership.
But when it comes to the wider economy, Mr McDonnell said Labour should "look elsewhere" for solutions, and draw on its tradition of supporting workers' co-operatives.
He signalled support for giving employees in companies which are about to be sold off  - or floated on the stock exchange - the first option to purchase the company.
"The Tories have offered a Right to Buy, Labour would seek to better this. We'd be creating a new Right to Own," he said in a speech in Manchester.
He said the "biggest hurdle" facing co-ops and other small businesses was getting initial funding from high street banks.
"No other major developed economy has just five banks providing 80% of loans. We'd look to break up these monopolies, introducing real competition and choice.
"Regional and local banks, prudently run and with a public service mandate, have to be part of the solution here."
Mr McDonnell is also considering adopting the Italian government's policy of offering funding to help employee-owned enterprises to get off the ground.
"With consortium co-operatives providing an effective means for new businesses to share and reduce costs, we'd look to support these at a local level, working with local authorities, businesses and trade unions," he said.
He said the policy would be developed "over the next few years", adding:  "In an uncertain world where a laissez faire market approach continues to fail, co-operation is an idea whose time has come again.
"This is the start of developing a new, positive economic alternative for Labour."
He also urged Labour to embrace opportunities offered by the internet and new technology.
"Technology is proving disruptive. It can have terrible downsides - de-skilling and an accelerated concentration of wealth.
"But it also opens up new possibilities - the explosion of sharing that the Internet can provide.
"There is an entrepreneurial spirit at work here: not the theatrical meanness and one-upmanship of Gordon Gekko, but a desire to create something better for us all."
Chief Secretary to the Treasury Greg Hands said Labour represented "a threat to our economic security".
He added: "Now we know the truth: Labour is planning another debt-fuelled spending spree and a huge tax bombshell on the businesses that have helped to drive Britain's recovery from the economic mess they left behind."


Adam Cunnington's second-half strike was enough to earn Bromley victory as Halifax dropped closer to the relegation places.

The Shaymen held on until the 75th minute when the 28-year-old forward netted from Bradley Goldberg's cross.
Halifax were then denied an equaliser as Hamza Bencherif saw his shot, following a nice turn, hit the post.
The away side are a point above the drop zone, with Boreham Wood overtaking them after they drew with Barrow.


A newly-classified fossil gives clues to how life in the oceans recovered from a mass extinction about 250 million years ago.

The reptile is an early relative of the ichthyosaurs - a large group of marine reptiles that swam at the time of the dinosaurs.
With its tiny toothless head, the creature is something of a curiosity, say scientists.
The specimen suggests marine reptiles evolved quickly after the event.
Previous evidence has suggested it took a long time for animals in the seas to bounce back.
Details of the specimen, Sclerocormus parviceps, are unveiled in Scientific Reports.
Dr Nick Fraser, Keeper of Natural Sciences at National Museums Scotland, worked on the fossil alongside teams in the US and China.
"Here's something that gives us a sense of the evolutionary pathway," said Dr Fraser.
"We've still got a long way to go to see where the ichthyosaurs came from, however it's a step in the right direction.
"And it all points to a very rapid radiation after this mass extinction - this mother of all extinctions at the end of the Permian, which had a major impact on the Earth."
The ichthyosaurs are a large group of marine reptiles that were common in the Jurassic and the Cretaceous periods.
Most were dolphin-like in shape with streamlined bodies and long snouts.
But the new animal is something of a mystery, with its short snout, long, whip-like tail and thick ribcage.
And while many ichthyosaurs had teeth for catching prey, Sclerocormus lacked teeth and probably sucked up food.
"It looked a bit like a small-headed porpoise with a fairly broad stiff body," Dr Fraser told BBC News.
The creature fills the gap in the fossil record between primitive marine reptiles and the more advanced ichthyosaurs, which dominated the oceans for millions of years.
"We don't have many marine reptile fossils from this period, so this specimen is important because it suggests that there's diversity that hasn't been uncovered yet," said co-researcher Dr Olivier Rieppel of The Field Museum in Chicago.
"These ichthyosauriforms (ichythyosaurs and close relatives) seem to have evolved very quickly, in short bursts of lots of change, in leaps and bounds."
Prof Ryosuke Motani of the department of earth science at UC Davis also worked on the fossil.
"Sclerocormus is one of the most surprising marine reptiles that I have seen," he explained.
"Measuring 1.6 metres in total length it was one of the largest marine vertebrates of the time.
"It appeared after the mass extinction, which was at the end of the Permian, and quickly became extinct."
China's geology is ideal for finding the remains of marine reptiles from the ancient oceans.
There have been a wealth of recent fossil discoveries inside quarries, including Sclerocormus, which has taken several years to classify.
Earlier this month, some of the same researchers unveiled another marine reptile fossil, which was also found in China.
Named Atopodentatus, it lived 242 million years ago and had a distinctive hammer-shaped skull.
Follow Helen on Twitter.


Nine care homes for the elderly are to close in Cumbria, the county council has announced.

The authority said demand is falling and that the properties in question are not up to modern standards.
Of the homes to close, three are in Carlisle, with two in Whitehaven and one each in Cleator Moor, Egremont, Ulverston and Walney Island.
Campaigners opposed to the plan said bed numbers will halve and put pressure on families and the NHS.
The decision to close the homes was taken at a Cumbria County Council cabinet meeting in Carlisle earlier and follows a public consultation.
The authority said two new properties in Carlisle and Copeland, the plans of which were approved in February 2016, will be sufficient to cope with demand.
They are expected to open in 2018.
Councillor Beth Furneaux said: "We can't do nothing. The homes we've got are not full, many are running close to half full.
"Most of the places we are closing, the environment isn't suitable for providing high levels of dementia care."
Seven campaigners from the Socialist Party held a protest outside the council's headquarters ahead of the vote.
One of them, Brent Kennedy, said: "We need more beds, not fewer.
"They're going to get rid of 137 beds. That's going to cause problems for elderly people, their carers and families. It's also going to cause problems for the NHS."


Former Lazio boss Stefano Pioli has been appointed Fiorentina's head coach - one month after being sacked by Inter Milan.

Pioli, 51, was dismissed three games before the end of the Serie A season, in which Inter finished seventh and missed out on European football.
Fiorentina is the Italian's 12th different club as a boss having started his coaching career in 2003.
"It's always been my wish to coach here," said Pioli.
Former defender Pioli played 156 times for Fiorentina between 1989 and 1995.
"Only Fiorentina could have made me coach in Italy at this moment, otherwise I would have gone abroad," he added.
Pioli has also been boss at Italian clubs Salernitana, Modena, Parma, Grosseto, Piacenza, Sassuolo, Chievo, Palermo and Bologna.


Aberdeen have confirmed Peter Pawlett is likely to sign for MK Dons at the end of the season.

Dons manager Derek McInnes says the midfielder, whose existing deal ends in the summer, has had a long desire to play in England, and will "probably" leave Pittodrie.
McInnes told the club's online video channel RedTV Pawlett, 26, had been made a "good" offer by Aberdeen.
MK Dons are managed by former Hearts head coach, Robbie Neilson.
Since making his Aberdeen debut in early 2009, Pawlett has made more than 200 appearances for the club, scoring 20 goals.