The history of Islam in Japan is relatively brief in relation to the religion's longstanding presence in other nearby countries. Islam is one of the smallest minority faiths in Japan, representing around 0.18% of the total population as of 2019. Despite a small initial population base, immigration from Muslim majority countries has made Islam one of the fastest growing religions in the country in terms of percentage increase, with its followers growing by approximately 110%, from 110,000 in 2010 to 230,000 at the end of 2019, out of the total population of Japan of around 126 million.
 While there were isolated occasions of Muslim presence in Japan before the 19th century, today, approximately 90% of Muslims in Japan are of foreign origin, with the rest being native Japanese converts.
 There are isolated records of contact between Islam and Japan before the opening of the country in 1853, possibly as early as the 1700s; some Muslims did arrive in earlier centuries, although these were isolated incidents. Some elements of Islamic philosophy were also distilled as far as back as the Heian period through Chinese and Southeast Asian sources.
 The earliest Muslim records of Japan can be found in the works of the Persian cartographer Ibn Khordadbeh, who has been understood by Michael Jan de Goeje to mention Japan as the "lands of Waqwaq" twice: "East of China are the lands of Waqwaq, which are so rich in gold that the inhabitants make the chains for their dogs and the collars for their monkeys of this metal. They manufacture tunics woven with gold. Excellent ebony wood is found there." And: "Gold and ebony are exported from Waqwaq." Mahmud Kashgari's 11th century atlas indicates the land routes of the Silk Road and Japan in the map's easternmost extent.
 The first recorded Muslim in history to go to Japan was Sadr ud-Din (撒都魯丁 pronounced as Sādōulǔdīng in Chinese and Sadorotei in Japanese, also wrongly transcribed as 都魯丁 Dūlǔdīng and 撤都魯丁 Chèdōulǔdīng by the Japanese), sent by Yuan China in 1275 as a diplomatic delegation ordering the Japanese to submit to the Yuan emperor between the two Mongol invasions of Japan. He was beheaded by the Japanese. A Buddhist monk criticised the executions of the envoys.
 During that period there was contact between the Hui, general Lan Yu of the Ming dynasty and the swordsmiths of Japan. According to Chinese sources, Lan Yu owned 10,000 Katana, Hongwu Emperor was displeased with the general's links with Kyoto and more than 15,000 people were implicated for alleged treason and executed. Lan Yu's ethnicity is disputed with some Hui claiming he was Hui but his biography in official Ming records do not mention him being Hui.
 In the 13th century, a manuscript written by Persians from Quanzhou in China for the Japanese monk Keisei was brought back to Japan.
 Early European accounts of Muslims and their contacts with Japan were maintained by Portuguese sailors who mention a passenger aboard their ship, an Arab who had preached Islam to the people of Japan. He had sailed to the islands in Malacca in 1555.
 In the 17th century, Iranian merchants from Thailand arrived to Nagasaki during the Edo period. The Iranian Shaykh Ahmad fought and defeated Japanese merchants who attempted a coup against the Thai king in 1611. In the 17th century text Safine-ye Solaymani, Shia writer Mohammad Ibrahim described Japan and its culture, economy, recent political upheavals and their relationship with foreign merchants.
 The first modern Muslim contacts were with Indonesians who served aboard British and Dutch ships in the late 19th century.[citation needed]
 In the late 1870s, the biography of Muhammad was translated into Japanese. This helped Islam spread and reach the Japanese people, but only as a part of the history of cultures.[citation needed]
 Another important contact was made in 1890 when Sultan and Caliph Abdul Hamid II of the Ottoman Empire dispatched a naval vessel to Japan for the purpose of saluting the visit of Japanese Prince Komatsu Akihito to the capital of Constantinople several years earlier. This frigate was called the Ertugrul, and was destroyed in a storm on the way back along the coast of Wakayama Prefecture on September 16, 1890. The Kushimoto Turkish Memorial and Museum are dedicated in honor of the drowned diplomats and sailors.[citation needed]
 In 1891, an Ottoman crew who were shipwrecked on the Japanese coast the previous year were assisted in their return to Constantinople by the Imperial Japanese navy. Shotaro Noda, a journalist who accompanied them, became the earliest known Japanese convert during his stay in the Ottoman capital.
 In the wake of the October Revolution, several hundred Tatar Muslim refugees from Central Asia and Russia were given asylum in Japan, settling in several main cities and formed small communities. Some Japanese converted to Islam through contact with these Muslims. Historian Caeser E. Farah documented that in 1909 the Russian-born Ayaz İshaki and writer Abdurreshid Ibrahim (1857–1944), were the first Muslims who successfully converted the first ethnic Japanese, when Kotaro Yamaoka converted in 1909 in Bombay after contacting Ibrahim and took the name Omar Yamaoka. Yamaoka became the first Japanese to go on the Hajj. Yamaoka and Ibrahim were traveling with the support of nationalistic Japanese groups like Black Dragon Society (Kokuryūkai). Yamaoka in fact had been with the intelligence service in Manchuria since the Russo-Japanese war. His official reason for traveling was to seek the Ottoman Sultan and Caliph's approval for building a mosque in Tokyo. This approval was granted in 1910. The Tokyo Mosque, was finally completed on 12 May 1938, with generous financial support from the zaibatsu. Its first imams were Abdul-Rashid Ibrahim and Abdülhay Kurban Ali (Muhammed-Gabdulkhay Kurbangaliev) (1889–1972). However, Japan's first mosque, the Kobe Mosque was built in 1935, with the support of the Turko-Tatar community of traders there. On 12 May 1938, a mosque was dedicated in Tokyo. Another early Japanese convert was Bunpachiro Ariga, who about the same time as Yamaoka went to India for trading purposes and converted to Islam under the influence of local Muslims there, and subsequently took the name Ahmed Ariga. Yamada Toajiro was for almost 20 years from 1892 the only resident Japanese trader in Constantinople. During this time he served unofficially as consul. He converted to Islam, and took the name Abdul Khalil, and made a pilgrimage to Mecca on his way home.
 In the late Meiji period, close relations were forged between Japanese military elites with an Asianist agenda and Muslims to find a common cause with those suffering under the yoke of Western hegemony. In 1906, widespread propaganda campaigns were aimed at Muslim nations with journals reporting that a Congress of religions was to be held in Japan where the Japanese would seriously consider adopting Islam as the national religion and that the Emperor was at the point of becoming a Muslim.
 Nationalistic organizations like the Ajia Gikai were instrumental in petitioning the Japanese government on matters such as officially recognizing Islam, along with Shintoism, Christianity and Buddhism as a religion in Japan, and in providing funding and training to Muslim resistance movements in Southeast Asia, such as the Hizbullah, a resistance group funded by Japan in the Dutch Indies. The Greater Japan Muslim League (大日本回教協会, Dai Nihon Kaikyō Kyōkai) founded in 1930, was the first official Islamic organisation in Japan. It had the support of imperialistic circles during World War II, and caused an "Islamic Studies Book". During this period, over 100 books and journals on Islam were published in Japan. While these organizations had their primary aim in intellectually equipping Japan's forces and intellectuals with better knowledge and understanding of the Islamic world, dismissing them as mere attempts to further Japan's aims for a "Greater Asia" does not reflect the nature of depth of these studies. Japanese and Muslim academia in their common aims of defeating Western colonialism had been forging ties since the early twentieth century, and with the destruction of the last remaining Muslim power, the Ottoman Empire, the advent of hostilities in World War II and the possibility of the same fate awaiting Japan, these academic and political exchanges and the alliances created reached a head. Therefore, they were extremely active in forging links with academia and Muslim leaders and revolutionaries, many of whom were invited to Japan.
 Shūmei Ōkawa, by far the highest-placed and most prominent figure in both Japanese government and academia in the matter of Japanese-Islamic exchange and studies, managed to complete his translation of the Qur'an in prison, while being prosecuted as an alleged class-A war criminal by the victorious Allied forces for being an 'organ of propaganda'. Charges were dropped due to the results of psychiatric tests.
 The Japanese invasion of China and South East Asian regions during the Second World War brought the Japanese in contact with Muslims. Those who converted to Islam through them returned to Japan and established in 1953 the first Japanese Muslim organisation, the "Japan Muslim Association", which was officially granted recognition as a religious organization by the Japanese government in June 1968. The second president of the association was the Umar Mita, who was typical of the old generation, learning Islam in the territories occupied by the Japanese Empire. He was working for the Manshu Railway Company, which virtually controlled the Japanese territory in the northeastern province of China at that time. Through his contacts with Chinese Muslims, he became a Muslim in Beijing. When he returned to Japan after the war, he made the Hajj, the first Japanese in the post-war period to do so. He also made a Japanese translation of the Qur'an from a Muslim perspective for the first time. Al Jazeera also made a documentary regarding Islam and Japan called "Road to Hajj – Japan".
 The economic boom in the country in the 1980s saw an influx of immigrants to Japan, including from majority Muslim nations. These immigrants and their descendants form the majority of Muslims in the country. Today, there are Muslim student associations at some Japanese universities. In 2016, Japan accepted 0.3% of refugee applicants, many of whom are Muslims.
 In 1941, one of the chief sponsors of the Tokyo Mosque asserted that the number of Muslims in Japan numbered 600, with just three or four being native Japanese. Some sources state that in 1982 the Muslims numbered 30,000 (half were natives). Of the ethnically Japanese Muslims, the majority are thought to be ethnic Japanese women who married immigrant Muslims who arrived during the economic boom of the 1980s, but there are also a small number of intellectuals, including university professors, who have converted. Most estimates of the Muslim population in the 2000s give a range around 100,000 total. Islam remains a minority religion in Japan. Conversion is more prominent among young ethnic Japanese married women, as claimed by The Modern Religion as early as the 1990s.
 The true size of the current Muslim population in Japan remains a matter of speculation. Japanese scholars such as Hiroshi Kojima of the National Institute of Population and Social Security Research and Keiko Sakurai of Waseda University suggest a Muslim population of around 70,000 in 2007, of which perhaps 90% are resident foreigners and about 10% native Japanese. Of the immigrant communities, in order of population size, are Indonesians, Indians, Pakistanis and Bangladeshis. The Pew Research Center estimated that there were 185,000 Muslims in Japan in 2010. For 2019 it was estimated that the numbers rose to 230,000, due to the more friendly policies towards immigration, the Japanese converts being estimated at 50,000, and Japan now has more than 110 mosques compared to 24 in 2001. As of 2020, nearly half of the Muslims in Japan were Indonesians, Filipinos, and Malaysians. Another 2019 estimate places the total number at 200,000, with a ratio of 90:10 for those of foreign origin to native Japanese converts.
 The Muslim population is also young suggesting the permanent Muslim population will establish a second and third generation.
 The percentages of Muslim populations of each prefecture from 2020.
 Japan's first mosque was the Kobe Muslim Mosque, established in 1935. According to japanfocus.org, as of 2009 there were 30 to 40 single-story mosques in Japan, The largest of which is the Tokyo Mosque, plus another 100 or more apartment rooms set aside for prayers in the absence of more suitable facilities. 90% of these mosques use the 2nd floor for religious activities and the first floor as a halal shop (imported food; mainly from Indonesia and Malaysia), due to financial problems, as membership is too low to cover the expenses. Most of these mosques have only a capacity of 30 to 50 people. In 2016, the first ever mosque tailored for native Japanese worshipers (as opposed to services in foreign languages) was opened. As of 2023, there is one Ahmadi mosque in Japan, The Japan Mosque. It was established in 2015 by Mirza Masroor Ahmad, the mosque has a capacity of 500 worshippers, the largest of any mosque in Japan.