TMZ has learned ... the judge just GRANTED the request to extend Amanda's psychiatric hold for another 2 weeks. So even if the judge denies the temporary conservatorship Friday ... Amanda will stay in the psych ward for 2 more weeks.
Amanda Bynes is in a court hearing right now to determine if the 5150 psychiatric hold will be extended for 2 weeks, and if the judge denies the extension Amanda could walk free tonight ... TMZ has learned.
Sources connected with the matter tell TMZ the hearing is being held in the psychiatric hospital where Amanda has been confined. A judge is presiding over the hearing at the hospital.
We're told Amanda has her own lawyer who is arguing that the extension should be denied.
Our sources say the doctors are arguing that they need the 2 weeks to properly diagnose Amanda ... and that releasing her could pose a danger to herself and others.
If the judge denies the extension the 72-hour hold expires in a matter of hours and Amanda could go free.
People connected with the case tell TMZ, however ... they feel confident doctors will win an extension.
We're also told the reason Amanda's parents are going to court Friday morning is because they are worried the judge will reject the 2 week extension and they want the ability to control her actions in the event that happens.