General aviation pilot reported they were given an incorrect departure climb altitude restriction by ATC which resulted in a terrain alert from the aircraft and ATC. Pilot climbed to clear the alert and received further climb clearance from ATC.
Synopsis
General aviation pilot reported they were given an incorrect departure climb altitude restriction by ATC which resulted in a terrain alert from the aircraft and ATC. Pilot climbed to clear the alert and received further climb clearance from ATC.
Narrative
Prior to departure; I called Clearance/Ground to obtain my IFR clearance. I received my clearance as typical. Everything was typical except the altitude instruction. Clearance instructed me to 'climb via the SID except maintain 400'. I repeated my clearance back to the controller other than the altitude. I asked them to repeat the altitude clearance; as it did not sound correct to me. ZZZ airport is at an altitude of 25 MSL; but an altitude of 400 feet AGL sounded very low. Upon my request; the controller repeated 'climb via the SID except maintain 400'. I repeated the full clearance back; including the altitude and received a response of '[Tail number]; readback correct'. I proceeded with my checklists and taxied for departure.Upon takeoff; I climbed to 400 AGL as instructed and called Departure as the tower handed me off. Almost simultaneously; I began receiving a terrain alert warning. I immediately disconnected autopilot and started to climb manually. Departure stated they were also receiving a terrain alert and instructed me to expedite my climb to FL260 (or something in that range...I can't remember exactly; but it was it was between FL200 and FL300) to avoid the mountain range at my 12 o'clock. I told Departure that I had only been cleared to 400. They stated they didn't know why and there must have been some sort of mix up. I climbed out at 5000 fpm and completed the flight without incident.The root of the issue was the terminology used by Ground/Clearance controller. When I was given an altitude of 400; it didn't sound right to me. Therefore; I asked to repeat it and was listening carefully for 'Flight Level' in front of the 400 clearance which was not stated. Typically; the terminology controllers use if they want to clear you to the flight levels from the ground is 'climb via the SID; Expect FL400 5 mins after'. This was definitely not the terminology used. Therefore; the instruction I received of 'climb via the SID; EXCEPT maintain 400' sounded like a limitation on the SID; not a clearance to the flight levels.This situation could have been avoided by using more precise language in the clearance. It also could have been avoided by me expressing that the altitude didn't sound correct and asking if they meant FL400 or truly 400 AGL.Since the situation occurred; I was told by ZZZ Center via phone that there are new controllers on the ground for the upcoming summer season and that could have contributed to the issue.Thankfully the situation ended safely. It definitely reinforces that as PIC; 'see something; say something' should be practiced liberally.
Source: NASA Aviation Safety Reporting System (public domain). Reports are voluntary submissions and are not verified by NASA.