San Marino in the Eurovision Song Contest 2017

San Marino participated in the Eurovision Song Contest 2017, held in Kyiv, Ukraine. The Sammarinese national broadcaster Radiotelevisione della Repubblica di San Marino (SMRTV) internally selected Sammarinese singer Valentina Monetta and American singer Jimmie Wilson with "Spirit of the Night" to represent the nation in the contest. Monetta had previously represented San Marino as a solo artist on three previous occasions. The 2017 entry in the Eurovision Song Contest was promoted through the creation of a music video and promotional performances in Tel Aviv, Amsterdam and Madrid. San Marino performed 10th in the second semi-final, held on 11 May 2017, and placed 18th with one point, failing to qualify for the final.

Background
Prior to the 2017 contest, San Marino had participated in the Eurovision Song Contest seven times since their first entry in 2008. The nation's debut entry in the 2008 contest, "Complice" performed by Miodio, failed to qualify for the final and placed last in the semi-final it competed in. San Marino subsequently did not participate in both the and  contests, citing financial difficulties. They returned in with Italian singer Senit performing "Stand By", which also failed to take the nation to the final. From 2012 to 2014, San Marino sent Valentina Monetta to the contest on three consecutive occasions, which made her the first singer to participate in three consecutive contests since Udo Jürgens, who competed in 1964, 1965 and 1966 for Austria. Monetta's entries in ("The Social Network Song") and  ("Crisalide (Vola)") also failed to qualify San Marino to the final, however in, she managed to bring the nation to the final for the first time with "Maybe", placing 24th. This marked their best placing to this point. The nation's next two entries, "Chain of Lights" performed by Anita Simoncini and Michele Perniola for and "I Didn't Know" by Serhat for, did not qualify for the final.

On 31 October 2016, the European Broadcasting Union (EBU) included San Marino in their list of the 43 countries that had signed up to partake in the Eurovision Song Contest 2017. The nation opted to internally select their entry for the contest.

Internal selection
On 7 March 2017, Radiotelevisione della Repubblica di San Marino (SMRTV) director general Carlo Romeo announced that San Marino would be represented by two singers: one from inside the European Union and one from outside of it. Five days later, SMRTV held a press conference where they announced that they had internally selected the song "Spirit of the Night" to be performed by Valentina Monetta and Jimmie Wilson. Monetta had previously represented San Marino in, and , while Wilson, originally of the United States, had first come to Europe to star in Michael Jackson's musical Sisterella. "Spirit of the Night" was written and composed by Ralph Siegel, who had written all of the entries of San Marino from 2012 through to 2015. The lyrics are by Steven Barnacle and Jutta Staudenmayer.

In December 2016, prior to the announcement of the selected entrants, Italian singer Tony Maiello claimed through a Facebook post that he had been approached to represent the nation if he paid 500,000 euros for promotion; costs he described as illegal. The claim prompted an official response from SMRTV, who explained that neither they nor someone on their behalf had contacted Maiello regarding any potential participation. In an article about the incident, Eurofestival News wrote that cost sharing between the broadcaster, artist and record label is common practice as the selected artist benefits from the publicity afforded to them by participating. Italian singer Arisa also later revealed that she had been approached to represent the nation; however, her costs were quoted at 300,000 euros, which her record label was unwilling to pay.

Promotion
To promote the entry, a music video for "Spirit of the Night" was filmed at the nightclub P1 in Munich. The video, along with an accompanying "making of" clip, was filmed by Siegel's daughter Alana and presented to the public during a press event on 24 March 2017 at the Grand Hotel San Marino. In the following weeks, Monetta and Wilson made several appearances across Europe to specifically promote "Spirit of the Night" as the Sammarinese Eurovision entry. Between 3 and 6 April, they took part in promotional activities in Tel Aviv, Israel where they performed the song during the Israel Calling event held at the Ha'teatron venue. On 8 April 2017, the two performed during the ninth annual edition of Eurovision in Concert which was held at the club Melkweg in Amsterdam, Netherlands and hosted by Cornald Maas and Selma Björnsdóttir. A week later, they performed during the Eurovision Spain Pre-Party, which was held at the Sala La Riviera venue in Madrid, Spain.

At Eurovision
The Eurovision Song Contest 2017 took place at the International Exhibition Centre in Kyiv, Ukraine. It consisted of two semi-finals held on 9 and 11 May, respectively, and the final on 13 May 2017. All nations with the exceptions of the host country and the "Big Five", consisting of, , , and the , were required to qualify from one of two semi-finals in order to compete for the final; the top 10 countries from each semi-final progress to the final. Semi-finalists were allocated into six different pots based on voting patterns from previous contests as determined by the contest's televoting partner Digame, with the aim of reducing the chance of neighbourly voting between countries while also increasing suspense during the voting process. On 31 January 2017, an allocation draw was held which placed each country into one of the two semi-finals and determined which half of the show they would perform in. San Marino was placed into the second semi-final, to be held on 11 May 2017, and was scheduled to perform in the second half of the show.

Once all the competing songs for the 2017 contest had been released, the running order for the semi-finals was decided by the shows' producers rather than through another draw, so that similar songs were not placed next to each other. Originally, San Marino was set to perform in position 11, following the entry from Ireland and preceding the entry from Croatia. However, following Russia's withdrawal from the contest on 13 April 2017 and subsequent removal from the running order of the second semi-final, San Marino's performing position shifted to 10.

The two semi-finals and the final were broadcast in San Marino on San Marino RTV and Radio San Marino with commentary by Lia Fiorio and Gigi Restivo. Fiorio and Restivo also served as the Sammarinese spokespersons, who announced the top 12-point scores awarded by the Sammarinese jury during the final.

Semi-final
Monetta and Wilson took part in respective dress rehearsals on 3 and 6 May followed by the jury show on 10 May 2017, where the professional juries of each country watched and voted on the competing entries.

The Sammarinese performance featured Monetta wearing a black and white outfit and Wilson dressed in all black. They were joined by three backing vocalists on stage, while colourful disco-themed neon LED screens surrounded them. Sammarinese Head of Delegation Alessandro Capicchioni described the style of the performance to be a simple choreography reminiscent of a live concert.

At the end of the show, San Marino was not announced among the top 10 entries in the second semi-final and therefore failed to qualify to compete in the final. It was later revealed that San Marino placed 18th in the semi-final, receiving no points from the juries and one point from the German televote.

Voting
Below is a breakdown of points awarded to San Marino and awarded by San Marino in the second semi-final and the final of the contest, respectively, and the breakdown of the jury voting and televoting conducted during the two shows.

Points awarded to San Marino
In the second semi-final, San Marino received one point in the televote from Germany; they received no points from the jury.

Detailed voting results
The following members comprised the Sammarinese jury:
 * Fabrizio Raggi – artist
 * Roberto Fabbri – guitarist (jury member in semi-final 2)
 * Monica Sarti – soprano singer
 * Doriano Pazzini – singer, guitarist
 * Susanna Sacchi – singer
 * Elia Conti – trumpet player (jury member in the final)