Given complex numbers $m_1,l_1$ and nonnegative integers $m_2,l_2$, such that
$m_1+m_2=l_1+l_2$, for any $a,b=0, ... ,\min(m_2,l_2)$ we define an
$l_2$-dimensional Barnes type q-hypergeometric integral
$I_{a,b}(z,\mu;m_1,m_2,l_1,l_2)$ and an $l_2$-dimensional hypergeometric
integral $J_{a,b}(z,\mu;m_1,m_2,l_1,l_2)$. The integrals depend on complex
parameters $z$ and $\mu$. We show that $I_{a,b}(z,\mu;m_1,m_2,l_1,l_2)$ equals
$J_{a,b}(e^\mu,z;l_1,l_2,m_1,m_2)$ up to an explicit factor, thus establishing
an equality of $l_2$-dimensional q-hypergeometric and $m_2$-dimensional
hypergeometric integrals. The identity is based on the $(gl_k,gl_n)$ duality
for the qKZ and dynamical difference equations.