<?xml version="1.0"?><?xml-stylesheet type="text/xsl" href="..\4_X02.xsl"?><ownershipDocument>    <schemaVersion>X0202</schemaVersion>    <documentType>4</documentType>    <periodOfReport>2005-02-22</periodOfReport>    <issuer>        <issuerCik>0000046129</issuerCik>        <issuerName>ALLIED MOTION TECHNOLOGIES INC</issuerName>        <issuerTradingSymbol>AMOT</issuerTradingSymbol>    </issuer>    <reportingOwner>        <reportingOwnerId>            <rptOwnerCik>0001257885</rptOwnerCik>            <rptOwnerName>PRINCE EUEGENE E</rptOwnerName>        </reportingOwnerId>        <reportingOwnerAddress>            <rptOwnerStreet1>ALLIED MOTION TECHNOLOGIES INC.</rptOwnerStreet1>            <rptOwnerStreet2>23 INVERNESS WAY EAST, STE. 150</rptOwnerStreet2>            <rptOwnerCity>ENGLEWOOD</rptOwnerCity>            <rptOwnerState>CO</rptOwnerState>            <rptOwnerZipCode>80112</rptOwnerZipCode>            <rptOwnerStateDescription></rptOwnerStateDescription>        </reportingOwnerAddress>        <reportingOwnerRelationship>            <isDirector>1</isDirector>            <isOfficer>0</isOfficer>            <isTenPercentOwner>0</isTenPercentOwner>            <isOther>0</isOther>        </reportingOwnerRelationship>    </reportingOwner>    <nonDerivativeTable>        <nonDerivativeTransaction>            <securityTitle>                <value>Common Stock</value>            </securityTitle>            <transactionDate>                <value>2005-02-22</value>            </transactionDate>            <transactionCoding>                <transactionFormType>4</transactionFormType>                <transactionCode>S</transactionCode>                <equitySwapInvolved>0</equitySwapInvolved>            </transactionCoding>            <transactionAmounts>                <transactionShares>                    <value>1000</value>                </transactionShares>                <transactionPricePerShare>                    <value>8.22</value>                </transactionPricePerShare>                <transactionAcquiredDisposedCode>                    <value>D</value>                </transactionAcquiredDisposedCode>            </transactionAmounts>            <postTransactionAmounts>                <sharesOwnedFollowingTransaction>                    <value>697750</value>                </sharesOwnedFollowingTransaction>            </postTransactionAmounts>            <ownershipNature>                <directOrIndirectOwnership>                    <value>D</value>                </directOrIndirectOwnership>                <natureOfOwnership>                    <value></value>                </natureOfOwnership>            </ownershipNature>        </nonDerivativeTransaction>        <nonDerivativeTransaction>            <securityTitle>                <value>Common Stock</value>            </securityTitle>            <transactionDate>                <value>2005-02-22</value>            </transactionDate>            <transactionCoding>                <transactionFormType>4</transactionFormType>                <transactionCode>S</transactionCode>                <equitySwapInvolved>0</equitySwapInvolved>            </transactionCoding>            <transactionAmounts>                <transactionShares>                    <value>9000</value>                </transactionShares>                <transactionPricePerShare>                    <value>7.98</value>                </transactionPricePerShare>                <transactionAcquiredDisposedCode>                    <value>D</value>                </transactionAcquiredDisposedCode>            </transactionAmounts>            <postTransactionAmounts>                <sharesOwnedFollowingTransaction>                    <value>688750</value>                </sharesOwnedFollowingTransaction>            </postTransactionAmounts>            <ownershipNature>                <directOrIndirectOwnership>                    <value>D</value>                </directOrIndirectOwnership>                <natureOfOwnership>                    <value></value>                </natureOfOwnership>            </ownershipNature>        </nonDerivativeTransaction>        <nonDerivativeHolding>            <securityTitle>                <value>Common Stock</value>            </securityTitle>            <postTransactionAmounts>                <sharesOwnedFollowingTransaction>                    <value>88800</value>                </sharesOwnedFollowingTransaction>            </postTransactionAmounts>            <ownershipNature>                <directOrIndirectOwnership>                    <value>I</value>                </directOrIndirectOwnership>                <natureOfOwnership>                    <value>By Family Trust</value>                    <footnoteId id="F1"/>                </natureOfOwnership>            </ownershipNature>        </nonDerivativeHolding>    </nonDerivativeTable>    <footnotes>        <footnote id="F1">The Reporting Person's spouse is the trustee of this trust for the benefit of the Reporting Person's children. The Reporting Person disclaims beneficial ownership of these shares.</footnote>    </footnotes>    <remarks></remarks>    <ownerSignature>        <signatureName>Susan M. Chiarmonte, Attorney-in-Fact for Eugene E. Prince</signatureName>        <signatureDate>2005-02-24</signatureDate>    </ownerSignature></ownershipDocument>