Sharif (also transliterated Shareef, Sherif, shreef Shareef, Alsharif, Alshareef (Arabic: ? ?ar?f), or Chérif (Darija: Chorfa)) is a traditional Arabic title. The origin of the word is an adjective meaning "noble", "highborn". The feminine singular is sharifa(h) or shareefa(h) (Arabic: ?ar?fah). The masculine plural is Ashraf (Arabic: ?a?r?f).
From 1201 until 1925, when the Hejaz was conquered by Ibn Saud, this family (the descendants of Hasan ibn Ali) held the office of the Sharif of Mecca, often also carrying the title and office of King of Hejaz. Descendants now rule the Hashemite Kingdom of Jordan, the name is taken from the Banu Hashim, the sub-tribe of Quraysh, to which Muhammad belonged.
Sunnis in the Arab world reserve the term sharif/sherif or shareef for descendants of Hasan ibn Ali, while sayyid is used for descendants of Husayn ibn Ali, Hasan's younger brother. Both Hasan and Husayn are grandchildren of the Islamic Prophet Muhammad, through the marriage of his cousin Ali and his daughter Fatima. However, since the post-Hashemite era began in 1925 after the fall of the Sharif of Mecca, the term sayyid has been used to denote descendants from both Hasan and Husayn. Shiites use the terms sayyid and habib to denote descendants from both Hasan and Husayn. Sayyids having ancestry from both Imams Hasan and Husayn use the terms Shareefayn, Sayyidayn, Sayyid AlShareef, or Sheikh Assayyid before their names and call themselves Najeeb AlTarfayn.
The Royal Family of Brunei, The Bolkiah Dynasty of Sultans, are also Sharifs through their ancestor Sharif Ali bin Ajlaan bin Rumayytha bin Muhammad AbuNumayy I who was the son of the Emir of Makkah Sharif Ajlaan and had migrated and settled in Borneo.
The word has no etymological connection with the English term sheriff, which comes from the Old English word sc?rgerefa, meaning "shire-reeve", the local reeve (enforcement agent) of the king in the shire (county). 
The first known Cherif, Idris I, was the great-grandson of Ali ibn Abi Talib and Fatima Zahra, the daughter of Muhammad and his first wife Khadijah. Idris I and his people fled from Syria to Morocco in 786 from the Abbasids after losing to them in the Battle of Fakhkh near Mecca in which his family was massacred. In 788, he was greeted by the Amazigh people of Volubilis, a Roman city near Meknes. He founded the Imperial City of Fez. It is believed that Idris I was poisoned in 791 by a servant sent by Caliph Harun al-Rashid, leaving his wife Kenza pregnant. His servant Rached, a freed slave, helped Kenza raise Idris II who was born 2 months later.
Idris II came to the throne at the age of eleven. His tomb is located in Moulay Idriss, a village up on a mountainside near Volubilis. Idriss II's descendants ruled the country until the second half of the 10th century, when they lost their authority to the invasions of the Zenata, an Amazigh tribe under the orders of the Fatimid Caliphate, later the Caliph of Cordoba.
According to French historians, Abdelkader El Djezairi was a descendant of Muhammad . The full name of El Amir Abdelkader is Abd el-Kader ibn Muhyidin, ibn Mostafa (qui s'est installé définitivement dans la plaine d'Ighriss), ibn Muhammad, ibn Ahmed, ibn Muhammad, ibn Abdel-Kaoui, ibn Ali, ibn Ahmed, ibn Khaled, ibn Yussef, ibn Ahmed, ibn Bachar, ibn Muhammed, ibn Massoud, ibn Taous, ibn Yacoub, ibn Abdelkaoui, ibn Ahmed, ibn Muhammad, ibn Idriss II, ibn Idriss I, ibn Abdallah El Kamel, ibn Hassan El Muthana, ibn Hassan Essabt, ibn Ali.
The Senussi, a political-religious brotherhood, founded in Mecca by Sayyid Muhammad ibn Ali as-Senussi in 1837, came to become the Emirs of Cyrenaica in 1917 and then in 1922, the Emirs of Tripoli. The dynasty is of the Chofra descent through their sixth Senussi sultan, Ali ibn Omar. They came to be the kings of Libya.
The last king of Libya, Idris, was overthrown by a military coup in 1969. The current claimant for the Libyan throne is Sayyid Mohammed El Senussi. It is also claimed by Sayyid Idris bin Abdullah al-Senussi.
Just like in the Cherifian kingdom, the Cherifis of Mauritania are essentially of Hassanid origin and of Idrissid ancestry. There are, however, some families of Husseinid origin established mainly in Ouadane, in particular the Ahl Moulaye Ibrahim.
The Idrissid families descending from Hassan ibn Ali are: the Tichitt Sharifs (Ahl Abd El Mou'min) and the Ahl Cherif Al Ak'hal of the Laghlal tribe, who both claim descent from Moulaye Abdallah ibn Idriss II.
Note that the cherifs of Néma and Oualata claim to be descendants of Muhammad al-Nafs al-Zakiyya, just like the Alaouite dynasty (the current royal family of Morocco), and the sheikh Ahmad al-Tijani of the Tijaniya tariqa.
The Asharaaf elders sub-divided the Asharaaf in the following way:
Asharaaf in Somalia are either related to Muhammad through his grandsons Hassan ibn Ali or Husayn Ibn Ali. The Hussein branch of the Asharaf of Somalia live in the coastal towns such as Mogadishu and are part of the 'Benadiri' minority population. A few have moved to other places in order to trade or because they have bought land.
The Ashraf of the Hassan branch live mainly in the interior of the country (some of them of course may have gone to live in Mogadishu), and mostly are not Benadiri. However, the Asharaf al-Ahdali in Merca, who are Benadiri, are said to be Hassan.
The Asharaf elders indicated that they are living in Southern Somali and in Kenya and Ethiopia however they mostly like in urban locations such as Bardera, Kismayo, Baidoa, Hudur, Merca, Brava, Luuq, Jalalaqsi, Buur Ukur, Beledweyne, and Mogadishu. The largest concentration of Ashraf are found in Mogadishu the oldest Mosques are in such as the Masjidka Ahnaafta 7 Century, Masjidka (Sheikh Ahmed Sharif, Oldest Mosque in Africa) in the heart of Mogadishu, Jama Shangani, All Masaajid in the District are 13. Mogadishu. Some Ashraf settled in Ethiopia after being exiled from Somali during the Ogaden war in 1977. These Asharaf are settled in Ogaden in the Gode region mainly, Dire Dawa, Oromia, Harar, however many Asharaf fled Somali during the 1991-1992 Somali Civil War. Most of them are all over the World.
People with the title Sharif is also the branch of Fatima the daughter of Muhammed.
The Asharaf are from the descendants of Muhammed. Sharif (the word of which Asharaf is the superlative). It is an Arabic word meaning 'noble' or 'respected'. It can be attached to one of a person's names or to more than one, and an individual may use it at one time but not at another. It can be used by all Ashraf, but is not necessarily and many nowadays prefer to omit it. It is not generally a personal name, and hence will not necessarily appear on documents such as identity card or passport. It is sometimes used as a personal name, not only among the Asharaf. The most popular person with Sharif title in hadhramout, Yemen is Alsharif Mudhir bin Abdulrahman Ba Alawi who lived in Tarim and died in 2010.
The Bolkiah Dynasty of Sultans of Brunei claim their Sharifian ancestry to Sharif Ali bin Ajlaan bin Rumaytha bin Muhammad AbuNumayy I who was the son of the Emir of Makkah and had migrated and settled in Borneo by marrying the daughter of the 3rd Sultan Ahmed.
Many Royal Families currently and previous of Malaysia, Indonesia, Java, Sumatra, Philippines and Singapore had Sharifian lineage for examples: the Hashemite Dynasty of Sultans of Sulu whose ancestor was Sharif ul-H?shim of Sulu and another ex-royal family is the Alsagoff Family of Singapore.