If you are not prepared for this role, then you probably should not accept it. However, consider these things:
You have been asked to do this. If you were the one asking for it, then it would be different. Management may be "setting you up for failure" or maybe they have real confidence in you.
You are in a political minefield - and everyone else probably knows it also.
If there are people there with more experience, then you being asked to do the job should be a red flag. However, you have been there since the beginning of the project and there probably is no one more qualified to lead the project.
All of this said, you may not be the right person for the job. Although you have interest you should determine if your interest is in "promotion" vs "management." If you really want to learn about management and spend less time on technical work, then you should talk to the person/people that are requesting you to do this.
One approach is to tell them that you would like to do a good job, but maybe you should be placed in the role on a "temporary" basis. After a period of time (3 months? 6 months? A year?) you will have a review period where you (and leadership) can decide if your new role is working for both you and them. This can be followed by another "trial" period, giving you time to evaluate the stability of the situation and also have time to adapt to your new responsibilities.
If asking this is too much of a risk, then things are complicated indeed. If you must, take the position and do your best. If you are this anxious going into it though, it may be best to avoid it until you feel more prepared. It should be acceptable to (and even respected by) your management to tell them that you feel that your contribution to the team is best where you are now, or even in a support role to someone that has more experience managing teams like yours. You can also suggest that you can fill the "lead" role temporarily as they search for the "right" person.
The client sounds like it needs leadership. It sounds like you are the best candidate, but may not perform to expectations. You are wise to find a politically acceptable way to handle this. And, given your wisdom, you may actually be the best person for the job. So, just work on setting expectations about your performance and role. Ask for support in your new role, or for assurance that you are fine in your current role.
Continue to assure your client of your support, cooperation and interest in the success of the project. That clearly is your position and your management should be aware of it. (Not to be confused with indecision or lack of self confidence - awareness of self limitations is a valuable trait.)
The core of this question is, "how to safely lead" but in the case of accepting a new job in a complex business setting. An answer to address day-to-day leadership for continued safety of your job requires specific questions about specific problems when they arise, and out of scope for a question regarding the initial evaluation of accepting responsibility for a leadership role.
My answer attempts to reduce the political risks associated with accepting a leadership role, and thus increasing the safety of performing in that role. Eliminating political dangers is impossible, while reducing political risks is a possibility and evaluating them prior to accepting responsibility minimizes the risk of encountering political problems, can enhance support when faced with political problems and increases safety in performing the job required.
Also consider that you may fall victim to politics that are unforeseeable at the time you make the decision. This is where many people undervalue the performance of leaders; when those that are truly skilled at leadership make it look easy. As you progress in this job and in your career you will likely fail at times - how you handle failure is a key leadership skill. Your superiors cannot expect perfection, but also may try to take advantage of inevitable problems/failures in your leadership.
All people are subject to political and other risks, regardless of skills, ability, experience or anything else. How you handle success, failure and the times in between is what makes someone suitable for leadership or not. Safety is about how to improve the handling of the given situation and, in this case, it is about improving the security (not success) of assuming a leadership role.