Deep X-ray lithography with synchrotron radiation represents the primary process step of the LIGA technique, by means of which high volume production of micro-mechanical, micro-optical and micro-fluidic components becomes possible. We report on a new approach where the direct patterning of an intermediate mask has been performed by an upgraded Leica ZBA23 shaped beam electron writer with an acceleration voltage of 40 kV. Optimised development and exposure processes as well as the use of particularly performed proximity correction methods allowed to produce feature sizes down to 0.4 mu m. Taking CD-values of the final gold absorber structure as a target, an optimised parameter set has been found to manufacture periodic lines-and-spaces structures of 1.5 mu m width with an accuracy of 0.18 mu m per edge which were written into 2 mu m thick PMMA resist. Additionally, new intermediate mask membrane materials have been investigated. Special PECVD deposition processes have been developed in order to produce thin mask membranes made from silicon nitride, silicon carbide, and diamond. We produced a fully operational LIGA working mask with a thickness of 4.5 mu m on the basis of a diamond membrane with a 30% thickness uniformity over a process diameter of 60 mm. Finally, thorough investigations have been performed in order to determine the accuracy of structure transfer in the X-ray lithography process to the final LIGA mask. Taking all the structure accuracy limiting aspects into account, we found a runout per edge of 0.15 mu m using the BESSY I radiation spectrum as a reference. These data fit very precisely into experimentally obtained results.