Holding someone to be equal to Allah Most High in His Being (Dhaat) or attributes is the worst possible sin. It is called in the Shariah as “Shirk”. It is such a sin that those who commit it will never be forgiven. It is of 2 kinds:
1. The overt ascription of partners to Allah Most High (Shirk Jali)
2. The covert ascription of partners to Allah Most High (Shirk Khafi)
Almighty Allah is Wajib Ul Wujood i.e. necessary for the continued existence of all creation. The Lord has been there even before the beginning of time and will be there even after the end of time. He is unique and unparalleled in His Being, attributes and works. He is the only One worthy of being worshipped. Crediting anyone else with the aforementioned attributes and/or considering someone else as worthy of being worshipped is Shirk Jali.
Ostentation in one’s worship and prayer is Shirk Khafi. The attributes found in the creation are all created by Allah Most High and are dependent on Him.
Imam Qurtubi (May Allah shower His mercy on him) has penned a beautiful exposition in Al Jame’ Li Ahkaam Il Quran that with the scholars, there are 3 categories of Shirk and all 3 of them are Forbidden (Haraam).
The first is to ascribe partners to Allah Most High in His godhood (‘Uluhiyyah). This is the worst form Shirk. The idolaters of Makkah were guilty of this.
The second is to consider someone as a partner to Allah Most High in His works that somebody can do something without the grant and will of Allah Most High, even though that other entity might not be included in godhood as well.
The third is to ascribe partners to Him in worshipping Him and this is ostentation (Riya). What it means is that those acts of worship which were to be performed only for the pleasure and approval of Allah are performed to show off to other people. This renders everything futile. This is called Shirk Khafi, which the ignoramuses don’t understand. (Al Jame’ Li Ahkaam Il Quran, Vol. 5, Pg. No. 181)
The Holy Quran declares considering someone else as equal to Allah Most High in His Being or attributes or worshipping someone other than Allah Most High as “Dhulmun Azeem”.
Indeed ascribing partners to Allah is a great sin. The person who does it will remain in hell forever.