Ibn Abza said, "Ask Ibn Abbas about the words of Allah Most High, 'And whoever kills a believer intentionally, his recompense is Hell, abiding there forever, and the wrath of Allah is upon him, and He has cursed him and prepared for him a mighty punishment' [Nisa 4:93], and about His words, 'And they do not kill the soul which Allah has forbidden except by right'" [Furqan 25:68], continuing until he reached "except for the one who repents" [Furqan 25:70].So I asked him about it, and he said, "When this was revealed, the people of Makkah said, 'We have set up equals to Allah, we have killed the soul which Allah forbade except by right, and we have committed grave sins.' So Allah revealed, 'except for the one who repents, believes, and does righteous deeds' up to His words, 'Forgiving, Merciful' [Furqan 25:70]."
قال ابن أبزى: سل ابن عباس عن قوله تعالى: {ومن يقتل مؤمنا متعمدا فجزاؤه جهنم خلدا فيها وغضب الله عليه ولعنه وأعد له عذابا عظيما}[سورة النساء: ٩٣]، وقوله {ولا يقتلون النفس التي حرم الله إلا بالحق} حتى بلغ {إلا من تاب} فسألته، فقال: لما نزلت قال أهل مكة: فقد عدلنا بالله، وقد قتلنا النفس التي حرم الله إلا بالحق، وأتينا الفواحش، فأنزل الله: {إلا من تاب وءامن وعمل عملا صالحا} إلى قوله: {غفورا رحيما}
Bukhari related it in tafsir (4765), and Muslim in tafsir (19:3023), both by way of Shayban Abu Muawiya, from Mansur bin Mutamir, from Saeed bin Jubayr, who mentioned it. The wording given is that of Bukhari, and the wording of Muslim is similar, with an addition at the end where he said, "As for one who entered Islam with full understanding and then killed, there is no repentance for him."