The Ankara–Istanbul high-speed railway (Turkish: Ankara–İstanbul yüksek hızlı demiryolu), is a 562 km (349 mi) long high-speed railway linking Ankara and Istanbul in Turkey. The railway runs mostly parallel to the Istanbul-Ankara railway and passes through some of Turkey's most urbanized areas. The line hosts high-speed YHT train service with a maximum operating speed of 250 km/h (160 mph).
 Construction of the railway began in 2003, with testing commencing in 2007. On 13 March 2009 the first section of the railway, a 209.4 km (130.1 mi) section between Ankara and Eskişehir, opened to revenue service, making it the first high-speed railway in Turkey and the Middle East. On 25 July 2014, the railway was opened to Pendik, an eastern suburb of Istanbul, and with the completion of the Marmaray commuter rail project, opened to Söğütlüçeşme in central Istanbul on 19 March 2019.
 Attempts to construct a high-speed railway between Istanbul and Ankara date back to 1975, when the Turkish government finalized plans to build the Istanbul-Ankara rapid railway (Turkish: İstanbul-Ankara sürat demiryolu). This railway would diverge off the Istanbul-Ankara railway at Sincan and take a more direct route through the Köroğlu Mountains and re-join the existing railway at Arifiye. This new railway would shorten the route between the two cities by 160 km (99 mi) and with a planned maximum speed of 250 km/h (160 mph), it would drastically reduce travel time from 7.5 to 11 hours to 4.5 hours. The project was put into motion in 1976 when the tender to construct the Ayaş Tunnel was awarded to Nurol. The following year, on 28 March 1977, Deputy Prime Minister Necmettin Erbakan broke ground for the tunnel which would have been Turkey's longest railway tunnel at the time. However political instability, constant changes in government and problems with the construction of the tunnel delayed the project until construction was halted in the aftermath of the 1980 Turkish coup d'état. Following the coup, Turgut Özal was elected Prime Minister and his pro-automobile policies negatively impacted the project further.
 The Turkish government mothballed the project in the early 1990s and instead chose to upgrade the existing railway to accommodate speeds of up to 200 km/h (120 mph). However, due to the sharp curves west of Eskişehir, many sections of the route would only be upgraded to accommodate speeds of 90 km/h (56 mph) to 120 km/h (75 mph), which would impact overall transit times. A 33 km (21 mi) section of track between Eskişehir and İnönü was upgraded and expanded to a double-track line, opening in 1996. Apart from this short stretch of track, no further progress was made until September 1999, when the State Railways finalized plans of the railway between Eskişehir and Esenkent. Since this section of the railway runs through the relatively flat Ankara Plain, it would be upgraded to have a max speed of 200 km/h (120 mph). On 23 November 2000, the tender was awarded to the consortium ALSİM-ALARKO-OHL at a cost of €437 million. In the months following the agreement, the 2001 Turkish economic crisis hampered construction efforts and thus no progress was made on the railway. Groundbreaking finally began on 8 June 2003 in Ankara. This was done with a large ceremony in which then-Prime Minister Recep Tayyip Erdoğan attended.
 Initial construction focused on the upgrading of signalization between Ankara station and Sincan as well as Eskişehir and İnönü. Construction of the new right-of-way began in 2004 on the 206 km (128 mi) section between Esenkent and Eskişehir. However, the entire project was again subject to change. The project was revised and improved to increase speeds from 200 km/h (120 mph) to 250 km/h (160 mph) and instead of sharing the tracks with other rail traffic, the route would become a dedicated high-speed railway. This improvement was made official on 5 May 2005, when Erdoğan's cabinet approved the change. This new railway would be constructed separate from the existing one and be extended west of Eskişehir to Istanbul, thus becoming a true high-speed railway.
 The railway was divided into two main sections, with seven sections overall. In urban areas, the railway would run adjacent to or share the same right-of-way with the existing Istanbul-Ankara railway; thus these sections would also be upgraded to accommodate higher speeds. Along with upgrading shared portions of the route, the State Railways would integrate the high-speed railway with its urban commuter rail projects in Istanbul and Ankara. This included expanding the right-of-way from two tracks to three tracks in Istanbul and from three tracks to five tracks in Ankara along with rebuilding and modernizing existing stations.
 On the 25.2 km (15.7 mi) long stretch between Ankara station and Sincan, the high-speed railway shares the same right-of-way as the Istanbul-Ankara railway. Just like in Istanbul, the Turkish State Railways planned to upgrade and expand the entire route, to segregate track between commuter rail and high-speed and intercity rail and integrate it with the Ankara–Istanbul high-speed railway. In 1972, the railway had been expanded to three tracks; two tracks for commuter trains and one track for intercity and freight trains. Since Ankara was planned to be the center of Turkey's high-speed rail network, the existing track layout would not support increased train traffic. So the State Railways planned to expand the railway and rebuild and modernize the route. Between Ankara station and Marşandiz, the existing four tracks would be expanded to six tracks; two for commuter trains, two for high-speed trains and two for inter-city and freight trains. Between Marşandiz and Sincan, the existing three tracks would be expanded to five tracks; two for commuter trains, two for high-speed trains and one for inter-city and freight trains. Plans originally expected construction to begin in 2009 and finish in 2011.
 By 2009, no progress had been made on upgrading the railway, except building a temporary platform at Sincan, for high-speed trains. With new high-speed train service between Ankara and Eskişehir beginning in 2009 and between Ankara and Konya in 2011, the existing track capacity could not support the increase of trains. In 2011, the State Railways began to add a fourth track as well as upgrade the existing inter-city track. Commuter rail service was temporarily suspended as high-speed and inter-city trains began to use the south two tracks, while construction progressed. Originally, commuter trains were to be suspended for three months, but this later became two years. During this time, the railway was completely grade separated and a fourth track was added but construction of the full project did not progress very far. With public backlash to the closure, commuter trains were reinstated on 31 July 2013. It wasn't until 2016, when the project was restarted. Commuter train service was again suspended for 24 months. However, high-speed and inter-city rail service would be unaffected by the construction as they used the newly expanded north tracks to enter and exit Ankara. Construction progressed quickly and the Ankara-Sincan section of the route was fully opened on 12 April 2018.
 The first main section of the railway is the 225 km (140 mi) long stretch from Sincan, a western suburb of Ankara, to Eskişehir. This portion itself was constructed in three separate sections.
 The first section branches off the existing railway at Sincan. From there it uses the right-of-way of the never completed Istanbul-Ankara rapid railway for 1.5 km (0.93 mi) until turning southwest. Passing through a cut-out, a viaduct and a tunnel, to navigate the hills west of Sincan, it crosses the existing railway at Esenkent, where a junction was built. Construction of this 15 km (9.3 mi) stretch of route begun in 2004 and construction ended in 2009. However, the route did not open to revenue service until 13 March 2010. With a top speed of 250 km/h (160 mph), the longest bridge on this section spans 360 m (1,180 ft) and the longest tunnel spans 280 m (920 ft).
 The second and longest section spans 206 km (128 mi) from Esenkent to Eskişehir. Following the junction at Esenkent, the line runs parallel to the existing railway for the whole route. East of Polatlı, the high-speed railway heads around the southern periphery of the town, where a new high-speed railway station was built. This station, accessible via the D.260, is the first railway station in Turkey, exclusively for high-speed rail. West of Polatlı, the railway passes Polatlı junction, where the Polatlı-Konya high-speed railway, opened in 2011, branches south to Konya. Following this junction, the railway crosses the Sakarya River over the Sakarya Viaduct. Crossing the river and the adjacent plains, the Sakarya Viaduct is the third longest bridge in Turkey, spanning 2,293 m (7,523 ft). Just east of Eskişehir, the high-speed railway rejoins the conventional one and uses the existing right-of-way to access Eskişehir station.
 Construction of this section began in 2004 and was completed in March 2007. The State Railways approved testing on the route on 28 March 2007 and an agreement was made, two days later, with TÜV SÜD Rail Gmbh. A set of Italian ETR 500 Y2 high-speed EMUs were borrowed from the Italian railways to conduct testing on the railway. The EMUs, consisting of four cars and two power cars, began testing on the railway on 25 April 2007. Testing was done with a foreign high-speed train set because the Turkish State Railways' order of their own high-speed train sets were still under construction in Spain. During testing, the ETR 500s set a new Turkish railway speed record, reaching 275 km/h (171 mph). A few months later, the same trainset broke its own record and set a new one on 14 September 2007, reaching 303 km/h (188 mph). This remains the highest speed ever reached by a train in Turkey.
 This is the first section on which construction began as well as the first section to open to revenue service. High-speed rail service was inaugurated on 13 March 2009, between Ankara and Eskişehir. However, until the 15 km section between Esenkent and Sincan was completed, high-speed trains used the existing railway until Esenkent, limiting speeds to 120 km/h (75 mph). The entire line opened in full a year later on 13 March 2010.
 The second main section of the railway is the 188 km (117 mi) long stretch from Eskişehir to Köseköy, an eastern suburb of İzmit. This portion of the route was constructed in two separate sections.
 Between Eskişehir and İnönü, 30 km (19 mi) west, the existing railway was double-tracked in 1996 and was originally planned to be upgraded to allow speeds of 200 km/h (120 mph). However, when the project was revised to increase speeds to 250 km/h (160 mph), a new right-of-way (mostly parallel to the existing one) was to be built. Plans were finalized in 2004, but construction did not begin until 2006. On 24 March 2006, a tender was signed with SİGMA İns. ve Turz. İşl. Tic. AŞ and construction began on 3 April. While most of this section was complete by 2012, it did not open until the rest of Section 2 was completed, in 2014.
 The second portion of Section 2 spans 158 km (98 mi) from İnönü to Köseköy. This portion of the railway was divided into two subsections from İnönü to Vezirhan (54 km (34 mi)) and Vezirhan to Köseköy (104 km (65 mi)). Just west of İnönü, the existing railway turns north to enter Bozüyük, while the high-speed railway keeps west. The railway passes Bozüyük to the south, where a high-speed railway station was constructed, 2.7 km (1.7 mi) south of the existing station on the Istanbul-Ankara railway. Exiting the relatively flat Eskişehir Plain, the route enters the mountainous Karasu River Valley. The terrain here was the most difficult and time-consuming part to construct in. A total of 38 tunnels and 8 viaducts were constructed to build the railway, the longest tunnel spanning 4,960 m (16,270 ft). For this section of the route, the tender was awarded to a Chinese-Turkish consortium of four companies: China Railway Construction Corporation, China National Machinery Import and Export Corporation, Cengiz İnşaat and IC İçtaş İnşaat. The tender agreement was signed on 11 July 2006 for the İnönü-Vezirhan portion and on 28 November 2006 for the Vezirhan-Köseköy portion. However, due to legal problems, construction was delayed for another two years. Construction of the İnönü-Vezirhan portion began on 22 September 2008, while construction on the Vezirhan-Köseköy portion began on 21 October 2008. Another high-speed railway station was built in Bilecik, 2.3 km (1.4 mi) north of the existing station on the Istanbul-Ankara railway. The existing railway passes right by the high-speed station but no platform has been built to serve as a connection.
 Originally, Section 2 was planned to be completed in 2010, but due to difficult terrain, construction was plagued with delays. However, by 2013, most of the railway had been constructed, except for two separate stretches involving long tunnels. With upcoming local elections in 2014, the AKP-dominated Turkish government pressured the State Railways into opening the high-speed railway, before these two stretches were completed. To bridge the gaps between the incomplete sections, high-speed trains would use the existing railway. Testing of the railway began in late-2013, with revenue service planned to begin in mid-2014. The expedited opening of the railway saw criticism from the opposition as well as the United Trade Union of Transport Employees (BTS). BTS criticized the move, claiming that the AKP government is skimming over proper construction and testing processes in an effort to gain political clout. BTS went on to compare this move to the 2004 Pamukova train disaster, the deadliest train accident in Turkish history. BTS instead requested that the opening of the railway be delayed until the entirety of the line is completed.
 Nevertheless, testing continued with no problems and the opening of service between Istanbul and Ankara was scheduled for 5 July 2014. However, on 4 July, a test train collided with a maintenance truck causing one car to derail. No injuries were reported, but this delayed the opening by a week. Following another delay, the section finally opened to revenue service on 25 July 2014.
 Construction of the two incomplete sections of the route continued, following the opening of the railway. The larger of the two incomplete stretches is the Doğançay Bypass (Turkish: Doğançay Ripajı). This 23 km (14 mi) bypass tunnels through the eastern Samanlı Mountains, rejoining the existing right-of-way just east of Sapanca. To bridge this gap, high-speed trains use the existing railway, which follows the Sakarya River and runs around the Samanlı Mountains, via Arifiye. The Doğançay Bypass was not included in the original 2008 tender. Instead the tender was opened on 21 February 2012. However, since the presented costs were above €400 million, the State Railways canceled the tender. No progress on the Doğançay Bypass was carried out for several years as trains continued to use the existing railway between Sapanca and Geyve. Progress on the bypass resumed in 2020, when a contract to build the bypass was signed with Soner Temel Mühendislik İnşaat ve Ticaret A.Ş on 17 February 2020. Construction resumed two days later, on 19 February. The southern 14 km (8.7 mi) section of the bypass was opened on 21 June 2021 between Geyve and Doğançay. The remaining 9 km (5.6 mi) section is expected to open in 2023.
 The other incomplete section lies just north of the village of Karaköy, between Bozüyük and Bilecik. This includes Tunnel-26, the longest tunnel on the entire railway. On 21 May 2009, an accident occurred further delaying the construction. This accident happened when construction crews working on the widening of the adjacent D.650 state highway, blew dynamite to open up a path for the road. However, this explosion destabilized the ground near the tunnel and the southern entrance to the tunnel collapsed. This accident prompted all construction works of the tunnel to halt. Just like the Doğançay Bypass, construction of Tunnel-26 did not continue for several years until 2017 when a new tender was awarded to IC İçtaş to finish the tunnel. Construction of this tunnel is expected to be completed in 2022.
 The remaining portion of Section 2 runs on the expanded right-of-way with the existing railway from Sapanca to Köseköy. Köseköy is where the true high-speed part of the railway ends as the speed limit is decreased from 250 km/h (160 mph) to 160 km/h (99 mph).
 From Köseköy to İzmit, the high-speed railway shares the four-track right-of-way with the conventional railway. The two north tracks on the line are used mostly by high-speed trains while the two south tracks are for all other trains. The speed limit for all tracks is 160 km/h (99 mph). West of İzmit, the two railways are merged on a three-track right-of-way to Gebze. Instead of constructing a new dedicated high-speed railway between İzmit and Istanbul, the State Railways opted to expand the existing right-of-way and upgrade the tracks for higher speeds. This decision was made since the area between the two cities are heavily urbanized and building a new dedicated line would require the acquisition and demolition of hundreds of properties.
 The Istanbul-Ankara railway was upgraded between Istanbul and İzmit in the 1970s, which allowed for higher speeds compared to the old alignment. Together with the infrastructure upgrades done in preparation for the high-speed railway, the tracks on this section can accommodate speeds up to 160 km (99 mi). In order to upgrade this section of track, the railway would have to be closed to all traffic for about 24 months. This move was met with criticism since the railway was Istanbul's only direct rail connection to the rest of Anatolia. Nevertheless, on 1 February 2012, the railway closed to all traffic between Gebze and Köseköy. Originally a double-track railway, it was expanded to a quadruple-track railway between İzmit and Köseköy and a triple-track railway between Gebze and İzmit. Most stations between Gebze and İzmit were closed down, with a few being rebuilt. As of 2022, Derince, Körfez, Hereke and Diliskelesi stations are in operation. Progress on this section progressed normally and upgrades were widely complete by 2014. Only the 29.6 km (18.4 mi) section between Körfez and Gebze remained partially incomplete as the third track had not yet been laid. The railway reopened on 25 July 2014, together with the high-speed railway from Eskişehir to Pendik.
 This section of the railway was rebuilt as part of the Marmaray commuter rail system. The 44.1 km (27.4 mi) line was originally part of the Haydarpaşa suburban commuter rail line, running from Haydarpaşa to Gebze. The Marmaray project expanded the existing double-track railway to a triple-track railway along with the construction of the Marmaray Tunnel under the Bosphorus, connecting the line to the Istanbul-Pythio railway in East Thrace. The project uses the S-Bahn method of divided rail traffic; the two north tracks would be reserved for commuter trains, while the south track would be reserved for high-speed, intercity and freight traffic. Unlike the situation in Ankara, due to Istanbul's dense urbanization, the State Railways were unable to add a fourth track along the entire line. When complete, high-speed trains will have the option to continue over into Europe or terminate at Haydarpaşa.
 The railway line was closed down partially, between Pendik and Gebze, on 29 April 2012. On 19 February 2013, the remaining section between Pendik and Haydarpaşa was closed to traffic. Construction progressed as expected between Gebze and Pendik, with this portion of the railway opening on 25 July 2014. High-speed trains from Ankara would terminate at Pendik (24 km (15 mi) east of Haydarpaşa, until the remaining section of the railway was finished. However the remaining section saw significant delays. Originally expected to open in 2015, problems with the existing tender contract prompted Obrascón Huarte Lain to slow down construction works in 2014. OHL then requested the contract be terminated, citing growing construction costs. In response to this, the contract was taken over by a Turkish consortium Kolin-Kalyon-Cengiz and the expected opening was pushed back further to 2017 and then to 2018. Construction widely completed in late 2018 and the first test run was conducted on 28 December 2018. On 19 March 2019, the railway re-opened to rail traffic from Pendik to Söğütlüçeşme. However, the re-opening of Haydarpaşa station was indefinitely postponed. Since the Marmaray tunnel branches off the railway 900 m (3,000 ft) east of Haydarpaşa, plans to abandon this short section of railway and turn Haydarpaşa and its surrounding railway facilities into an urban redevelopment project surfaced in the late 2000s. This move was heavily criticized and protests were staged in front of the station, every Sunday, for years. This immense public backlash forced the government to re-integrate the station into the Marmaray project. In December 2015, restoration works began on the station building, platforms and tracks. However, in 2018 another setback further delayed the opening of Haydarpaşa. Archeological remains of a Byzantine settlement were found, during construction works. This put all construction on halt as archeologists set up camp to study the findings. The State Railways announced that the station will reopen, but a date has not yet been set. When the station re-opens, high-speed trains that don't continue over to Europe will terminate at Haydarpaşa.
 As of 2022, the majority of high-speed trains terminate at Söğütlüçeşme, with two daily trains continuing to Halkalı, via the Marmaray tunnel.
 There are a total of 12 stations on the Ankara–Istanbul high-speed railway, with 11 of them in operation. At 8 of the operational stations, connections are available to TCDDT intercity trains while connections to commuter rail is available at 6 of them. The only station not in operation is Haydarpaşa station, in which renovations have been greatly impeded by the discovery of a Byzantine settlement under the trackbed. Each station on the line is new or has been rebuilt/expanded to accommodate high-speed trains. A new building was built over the south side of Ankara station to accommodate new high-speed train traffic, with an exclusive YHT concourse, shops and hotels. Eskişehir station was rebuilt with larger and longer platforms and a new transfer station near Sincan, Ankara, was constructed to provide connections between YHT and Başkentray commuter rail. Stations in sections of the railway with high-speeds have at least two express tracks for trains to pass at-speed.
 Services on the line are all YHT high-speed rail trains operating at a maximum revenue speed of 250 km/h (160 mph). The portion of the railway with the most high-speed traffic is between Polatlı junction (west of Polatlı YHT station) and Ankara. This is the section where trains to Konya and Karaman use the Ankara–Istanbul high-speed railway, before diverging south at Polatlı junction. As of mid-2022, YHT trains operating on the railway are as follows:
 Alcatel won an $80 million contract to supply signalling services on the line, as well as interlockings and control systems, while Thales Group has been contracted to supply an ETCS train control system for the Sincan—Eskisehir portion of the route.