During the New Kingdom of Ancient Egypt, starting with Amnhotep III and ending with Ramses XI, pharaohs were worshipped as living 'deities'. After the declaration of Wehem Mesut and the subsequent collapse of the 20th dynasty, and by extension, the New Kingdom of Ancient Egypt into the Third Intermediate Period, pharaohs were no longer seen as 'deities' by the common populace. The building of Mammisi (essentially a birth chapel) during the Late Period served as an attempt to legitimize the pharaoh as a son of the Egyptian 'deities', and so that the pharaonic cult could perhaps potentially continue. Of course, by the end of the Late Period, the pharaoh was seen as essentially just a regular human being who by something akin to the divine right was put on the throne to rule the country.
What I'm curious about is where the cutoff is: basically, who is the last pharaoh in the history of Egypt to be seen as 'divine'? I have tried looking for relevant sources on this, but I couldn't find an exact cutoff.